Q. How can I get the CD or DVD that I burn to automatically open at a page or document that I specify?

Download shelexec.zip and unzip ShelExec.exe and ShelExec.htm.

The ShelExec.htm file contains:

Places where you might find ShelExec useful are in adding an autorun.inf file to your CD / DVD +/- RW discs. For example suppose you have a HTML page called index.htm on the root of your CD which you would like to run automatically whenever the user inserts the CD. All you need to do is put ShelExec.exe, some ico file (this is optional as is the icon=... in the autorun.inf file) and the index.htm files into the root directory and create a autorun.inf file with the following contents:

open=ShelExec.exe @[email protected]\index.html
Note that it is important to use the @[email protected] or @[email protected] replacement parameters as this helps ensures that ShelExec uses a fully quoted path when it runs your program. Otherwise you can get some problems on various versions of Windows with your AutoRun CD's.

Items that ShelExec can handle include any file which is registered with the shell e.g. Word .Doc files, Text Files, batch files etc etc. It can also handle URLS such as "http://www.naughter.com", "ftp://ftp.microsoft.com " and "mailto:[email protected]".

The more technically minded of you may say why is there a need to have this program since you can use "start filename" on autorun CD's without any apparent problems. The problem with this approach is that it does not work on NT / 2000 / XP and 2003 because on these operating systems "start" is implemented as an "Internal" command in cmd.exe (as opposed to a standard exe on 95/98) with the upshot that your CD's will not AutoRun on these operating systems. Using ShelExec will mean that your CD's will autorun on all OS's which support it.

Also remember that if the file you are calling contains spaces then you should include it in quotes. For example:

open=ShelExec.exe "a long pathname with spaces.html"

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.