Every time you plug a USB flash drive into your computer, Windows Explorer browses through the files and asks you which applications you want to open. It’s quite annoying! Sometimes, it can be really frustrating. You might prefer an auto-run feature similar to when you insert a CD into a CD-ROM drive. In this article, we will help you achieve this simple wish in just a few minutes.

[autorun]
open=PortableFirefox.exe action=Start PortableFirefox
icon=PortableFirefox.exe label=Portable Internet
In this case, the line “open= ” allows the AutoPlay feature of Windows XP to open the program mentioned in the example, which is PortableFirefox.exe. The command “action=” allows you to add parameters during loading, which in this case is Start PortableFirefox. However, you also need to pay attention to the paths if the files are not located in the root directory. You must exclude the drive name from the path since you cannot know what drive name will be used on other computers.
The “icon=” and “label=” lines indicate the icon and label of the drive that will be displayed in Windows Explorer. This icon can be embedded in the program or sourced from other files such as DLL or ICON files. The first icon in the list will be selected by default. However, you can change the icon by adding a number after the comma in the path to the program. The first icon is 0, the second icon is 1, and so on. For example: icon=PortableFirefox.exe,1 to use the second icon in the program.
Minh Phúc