OUTDATED. PLEASE SEE gists/Autorun.inf Commands.md
The Autorun script file at [DeviceLetter]\Autorun.inf
can be used to do a variety of things.
Valid line entries are:
[autorun]
- Required Header
Label=
- Name of device as shown in
Computer
.
- Name of device as shown in
Name=
- I'm not sure what the difference between
Label
andName
is, but I use both to be safe.
- I'm not sure what the difference between
Icon=
- Device icon as shown in
Computer
.
- Device icon as shown in
Open=
- Action to open a program when an autorun menu appears when the device is inserted. If located in a folder, just use the folder name followed by
/
then the program name and extension, e.g.Open=Autorun/Autorun.exe
- Action to open a program when an autorun menu appears when the device is inserted. If located in a folder, just use the folder name followed by
Run=
- I'm not sure what the difference between
Open
andRun
is, but I use both to be safe.
- I'm not sure what the difference between
Action=
- Name of list action for running a program when an autorun menu appears when the device is inserted, e.g.
Action=Install Device Program
- Name of list action for running a program when an autorun menu appears when the device is inserted, e.g.
shell\any_string\command=path\to\executable.exe
shell\any_string=name on context menu
shell\any_string_2\command=path\to\executable_2.exe
shell\any_string_2=name on context menu 2
The script can be written with uppercase or lowercase characters, it makes no difference. Here are some working examples:
[Autorun]
action=Install Drive Navi
label=Buffalo HD-PZU3 (F:)
icon=AUTORUN\Icon1.ico
open=DriveNavi.exe
run=DriveNavi.exe
[autorun]
ICON=AUTORUN\WDLOGO.ICO
NAME=Elements
[autorun]
OPEN=setup.exe
ICON=QuickCam\QuickCam.ico
shell\LVIPCAP\command=techsupt\LVidCap.exe
shell\LVIPCAP=Tool - L&VidCap.exe
shell\PCITEST\command=techsupt\Listpci.exe
shell\PCITEST=Tool - Listpc&i.exe
shell\USBREADY\command=techsupt\USBReady.exe
shell\USBREADY=Tool - &USBReady.exe
[autorun]
open=autorun.exe
icon=autorun.exe, 1
shell\readit\command=notepad readme.doc
shell\readit=Emperor &ReadMe
[autorun]
open="" autoplay=true
ICON="autorun\wdlogo.ico"