Article ID: 172078 - View products that this article applies to.
This article was previously published under Q172078
Microsoft Windows 95 and Microsoft Windows NT 4.0 both support the Autorun feature for CDs. The Autorun feature detects when a CD is inserted into the CD drive or DVD drive, and then runs an application based on the contents of the Autorun.inf file that is located on the CD.
A common use of this Autorun feature is to start an application's Setup routine when the CD is inserted. This article discusses how to enable this feature for a Microsoft Visual FoxPro application.
For more information about how to enable, disable, or troubleshoot Autorun functionality, click the following article numbers to view the articles in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/126025/ )How to disable the feature that allows CD-ROMs and audio CDs to run automatically
(http://support.microsoft.com/kb/967715/ )How to disable the Autorun functionality in Windows
(http://support.microsoft.com/kb/330135/ )The AutoRun feature or the AutoPlay feature does not work when you insert a CD-ROM in the drive
When a CD is inserted into the CD drive or DVD drive, the operating system checks for a file that is named Autorun.inf in the root directory of the CD. This file contains a pointer to an executable file that is named Autorun.exe.
The following Autorun.inf file is on the Windows 95 installation CD:
The OPEN= entry indicates the location of the Autorun.exe file, and the ICON= entry indicates the icon used to represent the CD drive or DVD drive in the Windows Explorer.
[autorun] OPEN=AUTORUN\AUTORUN.EXE ICON=AUTORUN\WIN95CD.ICO
To create an Autorun.inf file that starts a Visual FoxPro Setup routine, you must first create the distribution set. You can use the Setup Wizard to do this.
After you have created the distribution set, rename the Setup.exe file to Autorun.exe. Then, rename the Setup.lst file to Autorun.lst.
Create a new text file that is named Autorun.inf. Add the following code to this file.
Put 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 drive or DVD drive, the application's Setup routine starts.
For more information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/152395/ )How to use Setup Wizard to distribute VFP app on CD-ROM
(http://support.microsoft.com/kb/136214/ )How to test Autorun.inf files
Article ID: 172078 - Last Review: April 7, 2009 - Revision: 4.1
Contact us for more help