I feel pretty dumb at the moment, but for several days now, I have been completely confounded by the AutoPlay and AutoRun features of Windows. In essence, I have developed some software that will be deployed via optical media (e.g., CD-ROM, DVD-ROM). In a perfect world, our client wants the user to be able to simply pop in the CD and be off to the races.
We have explained to them that the actual AutoRun and AutoPlay features of Windows will be completely subject to the individual user's settings on his or her computer. But even with that said, on my own machine, I have been unable to detect and use an "autorun.inf" file.
The software itself is installed using a .msi file that is launched from a VBScript. Because the .vbs file is not directly an executable, I wrote a simple bootstrapper executable called setup.exe. Here is my very simple "autorun.inf" file:
[autorun]
open=setup.exe
That's it. No big deal. If I manually double-click the setup.exe, everything proceeds as expected. However, if I copy all of the necessary setup files to a disc (real or virtual drive) and insert the media, I do not have the option in AutoPlay to "Install or run program..."
I have tried tweaking my system AutoPlay settings to always install, and also to "Ask me every time." I am not sure whether Windows is not recognizing my disc as a "Software and Games" disc, or if it is just ignoring my autorun.inf file.
In any event, no matter that I try, whenever I test this out, I ONLY get the "General options" section of AutoPlay with the choice of "Open folder to view files."
Try this:
[autorun]
open=command /c start setup.exe