How to make a Windows AutoPlay CD

Updated: 06/30/2020 by Computer Hope
Computer CD-ROM

To make a CD autoplay in the Microsoft Windows operating system, follow the steps below for the version of Windows on your computer.

Note

This page covers how to create a CD that autoplays in Windows. For information about how to enable or disable the AutoPlay feature, see: How to enable or disable Windows AutoPlay.

In Windows 8 and Windows 10, create an autorun.inf file by pressing Ctrl+X to open the Power User Menu and selecting the Run option. Type notepad in the Run window and press Enter.

In Windows Vista and 7, create an autorun.inf file by clicking Start and typing notepad in the Search field. Click the Notepad program in the search results.

In Windows XP and earlier versions, create an autorun.inf file by clicking Start and selecting the Run option. Type notepad in the Run window and press Enter.

After opening the Notepad program, type the following:

[autorun]
open=setup.exe
icon=icon.ico

In the text above, the open line is for the executable file to automatically run. If you have a file other than setup.exe, type it into this line to run it automatically. Next is the icon statement, which is where you can specify the icon to use for the CD. Enter the name of the icon file in the icon line.

Once the three lines above are typed the Notepad file, save the file as autorun.inf and close the Notepad program.

Note

The autorun.inf file has some limited abilities, such as the inability to execute non-executable files. Often many users will want to create an autorun.inf file that executes an HTML file. However, entering something like "open=index.html" causes an error. For a CD to execute an HTML file, a batch file, a mail file, or almost any other file, try AutorunPro from GUI Computing Pty Ltd, available on our utility downloads page.

Additional information