How to autorun a piece of software from a CD/DVD on Windows 7?

3.2k views Asked by At

I want my software to run automatically from a CD/DVD with no user interaction whenever the user puts the CD/DVD into the drive. As far as I know autorun should still work with Windows 7, they just forbid it for USB drives.

But how?

Let's say I want to start my software xy.exe, what do I have to put inside my autorun.inf? I tried this but it's not working:

[AutoRun]
open=xy.exe

Is there anything else to do? Any suggestions?

2

There are 2 answers

0
Realmaven On

You may need to pass an argument to the program to be auto played:

[autorun]
open=myprogram.exe /argument
0
Sam Morris On

See MS' official Autorun documentation at

http://msdn.microsoft.com/en-us/library/cc144202(v=vs.85).aspx

Your autorun.inf example looks OK to me - if you are testing on Windows 7 then I would expect you to see the "AutoPlay" Window when you insert the CD, with xy.exe as an option, above "open folder to view files".

If you get no pop up at all then try right-clicking on the disc in My Computer and selecting AutoPlay in the context menu.