How to make an Autorun CD/DVD

autoruncompact-discdvd

How do I burn .exe files to a CD/DVD so that it will give options which one I want to install when the CD is inserted into the CD-ROM and run the applications on the disc automatically?

Best Answer

You're looking for Autorun.inf entries, you simply create a new file on the root of the CD/DVD/USB and call it "Autorun.inf". You can edit it with any text editor and update it with the parameters you need (see the linked items from MSDN).

From MSDN: Creating an AutoRun-enabled CD-ROM Application

AutoRun is a feature of the Windows operating system. It automates the procedures for installing and configuring products designed for Windows-based platforms that are distributed on CD-ROMs. When users insert an AutoRun-enabled compact disc into their CD-ROM drive, AutoRun automatically runs an application on the CD-ROM that installs, configures, or runs the selected product.

You'll probably mostly just need the Autorun.info Entries link at the bottom of that page.

Example Autorun.inf file:

[autorun]
label=Welcome To My EXE
open=myexe.exe /silent
icon=MyExeIcon.ico

Note: If you have file extensions hidden by default in Windows explorer, it will probably save your file as Autorun.inf.txt, so if it doesn't work - that may be why. To toggle that:

  1. Open Windows Explorer (just navigate to a folder)
  2. Hit ALT on your keyboard
  3. In the menu that appears up top, select Tools > Folder Options
  4. Select the View tab
  5. In the Advanced Settings scrollbox, toggle the checkbox for Hide extensions for known file types.
  6. Double check the naming of your Autorun.* file to make sure it saved correctly.
  7. Once you're done, feel free to re-hide extensions if you prefer that view for normal use.
Related Question