Question

I am writing code for autorun.inf file such as

[autorun]
open=Viewer\viewer.exe
icon=Viewer\viewer.exe,1

.exe is inside the Viewer Folder but i want to run or lunch this exe automatically (as Autoplay) whenever user insert CD/DVD inside the CD/DVD Drive.

But actually this is not working. I dont know why?

OS: Windows 7 (32 Bit)

Était-ce utile?

La solution 2

I solve this answer just using single line

[autorun]
open=Viewer\viewer.exe
action=Start ShellRun-CD // this line is important

Autres conseils

In relation to the above mentioned question...

[autorun]
open=Viewer\viewer.exe
icon=Viewer\viewer.exe,1
action=Start ShellRun-CD // this line is important

The 1st line after the [autorun] tells the autoplay what file to execute. The 2nd line after the [autorun] displays the icon. If it is a DLL or EXE file then the optional position may be given. If it is an icon (.ico) file then not necessary. The 3rd line is the description that will appear when the autoplay dialogue appears. This line is not important and does not affect the execution of the program.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top