You are currently offline, waiting for your internet to reconnect

How to enable Autorun for Visual FoxPro applications distributed on CD-ROM

This article was previously published under Q172078
SUMMARY
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, andthen runs an application based on the contents of the Autorun.inf file that is locatedon the CD.

A common use of this Autorun feature is to start an application's Setuproutine when the CD is inserted. This article discusses how to enable thisfeature 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:
126025 How to disable the feature that allows CD-ROMs and audio CDs to run automatically
967715 How to disable the Autorun functionality in Windows
330135 The AutoRun feature or the AutoPlay feature does not work when you insert a CD-ROM in the drive
MORE INFORMATION
When a CD is inserted into the CD drive or DVD drive, the operating system checksfor a file that is named Autorun.inf in the root directory of the CD. This filecontains a pointer to an executable file that is named Autorun.exe.

The following Autorun.inf file is on the Windows 95 installation CD:
   [autorun]   OPEN=AUTORUN\AUTORUN.EXE   ICON=AUTORUN\WIN95CD.ICO				
The OPEN= entry indicates the location of the Autorun.exe file, and theICON= entry indicates the icon used to represent the CD drive or DVD drive in theWindows Explorer.

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 toAutorun.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.
   [autorun]   OPEN=AUTORUN.EXE					
Put this file and all the files from the distribution set in the rootdirectory of the CD.

When the CD is inserted into the CD drive or DVD drive, the application's Setuproutine starts.
REFERENCES
For more information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
152395 How to use Setup Wizard to distribute VFP app on CD-ROM
136214 How to test Autorun.inf files
Properties

Article ID: 172078 - Last Review: 04/07/2009 20:05:48 - Revision: 4.1

  • Microsoft Visual FoxPro 5.0 Standard Edition
  • Microsoft Visual FoxPro 5.0a
  • Microsoft Visual FoxPro 6.0 Professional Edition
  • kbhowto kbsetup KB172078
Feedback