I'm trying to configure autorun.inf on a
DRIVE_REMOVABLE tagged USB flashdrive to run an .exe file from a subdirectory with parameters.
So far I have had no luck using the information provided by msdn. I've also looked at several other questions here 1 2, and made sure AutoRun is enabled and disabled the group policy as explained in this answer.
One thing I noticed in the msdn shell_verb was the inconsistent usage of
\ throughout this manual—I tried both ways but either seemed to work (I assume that it should be
\). My autorun file is located in the root folder, some of the features seem to work, namely
My autorun file looks like this now:
[AutoRun] action=MyActionName shellexecute= mysubfolder/myprogram.exe shell/myverb/command=mysubfolder/myprogram.exe -myparameter shell/myverb=Open &MyAction open=mysubfolder/myprogram.exe -myparameter icon=myprogram.ico label=MyDeviceName
but neither autorun of the exefile, shell\verb or the open command works as expected. I've also tried to only use
open alone with
icon. I've also tried to use commands such as
start in the
open-option. I cannot find any documentation that explain if they need to be in a specific order either.
Edit: I've also tried to edit the registry key3
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer to decimal 145 (hex 0x00000091) but this did not work either.