Click Here To Get Amazing Facebook Profile Covers,Status Messages

How to use autorun.inf file in USB drive

There are situations when we need utilize autorun feature of windows for performing any particulat task when USB is inserted.The autorun feature of windows uses autorun.inf file to decide what to do when removeable USB is inserted in USB port.This autorun.inf file should be located in root directory of your USB drive and it is like .ini file.You can create this file using any text editor like notepad.

The content of autorun.inf file is collection of commands which you can use to run any executable or open any html file with menu or open flash file with nice menu effects for various tasks that can be performed using cd contents.
the commands section in autorun.inf file start with [autorun]
there should be one command in each line.
The label command is used to specify label to be displayed in explorer.
label=mycd

The icon command is used to specify the icon file which will be displayed insted of CD-ROM drive in explorer it can be .ico file or you can use the same icon as of your executable

using icon file
icon=myicon.ico
using executable
icon=setup.exe

the open command is most important command and it is used to specify the path and file name of your application.
open=setup.exe
the shellexecute command may be used to open a file from your USB drive that file will be opened with default application used to run that particular type of file.
shellexecute=filename

an example of autorun.inf file

[autorun]
label=mycd
icon=myicon.ico
open=setup.exe

Your rating: None Average: 5 (1 vote)