When a CD is inserted into the CD-ROM drive, the operating system checks for a file named Autorun.inf in the root directory of the CD. This file contains a pointer to an executable file named Autorun.exe.
The following Autorun.inf file was taken from the Windows 95 CD:
[autorun]
OPEN=AUTORUN\AUTORUN.EXE
ICON=AUTORUN\WIN95CD.ICO
The OPEN= entry indicates the location of the Autorun.exe file, and the ICON= entry indicates the icon used to represent the CD-ROM drive in the Windows Explorer.
To create an Autorun.inf file that launches a Visual FoxPro setup routine, you must first create the distribution set using the Setup Wizard.
Once the distribution set has been created, rename Setup.exe to Autorun.exe, and rename Setup.lst to Autorun.lst.
Create a new text file named Autorun.inf with the following contents:
[autorun]
OPEN=AUTORUN.EXE
Place this file and all the files from the distribution set in the root directory of the CD.
When the CD is inserted into the CD-ROM drive, the application's setup should be launched.