Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/172078

From BetaArchive Wiki
Knowledge Base


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

Article ID: 172078

Article Last Modified on 4/15/2005



APPLIES TO

  • Microsoft Visual FoxPro 5.0 Standard Edition
  • Microsoft Visual FoxPro 5.0a
  • Microsoft Visual FoxPro 6.0 Professional Edition



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, 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:

126025 How to disable the feature that allows CD-ROMs and audio CDs to run automatically


155217 How to enable or disable automatically running CD-ROMs


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 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:

   [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 drive or DVD drive in the Windows 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 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.

   [autorun]
   OPEN=AUTORUN.EXE
                    

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.

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


Keywords: kbhowto kbsetup KB172078