MOD2000: How to Use the Autorun.inf File to Run a Package Created with the Package and Deployment Wizard

Article translations Article translations
Article ID: 241264 - View products that this article applies to.
This article was previously published under Q241264
Expand all | Collapse all

SUMMARY

In Windows, whenever you insert a compact disc in a CD-ROM or DVD-ROM drive, Windows looks for a file named Autorun.inf. If the file exists, Windows follows the instructions contained in the file, which usually involves running a setup application of some sort. This article demonstrates how to use Autorun.inf with a package created by the Package and Deployment Wizard to run a setup application automatically.

MORE INFORMATION

CAUTION: If you follow the steps in this example, you modify the sample database Northwind.mdb. You may want to back up the Northwind.mdb file and follow these steps on a copy of the database.

To demonstrate using the Windows Autorun feature to automatically run Setup from a compact disc, follow these steps:
  1. Open the sample database Northwind.mdb.
  2. Press ALT+F11 to switch to the Visual Basic Editor.
  3. On the Add-ins menu, if the Package and Deployment Wizard is listed, skip to step 7.
  4. On the Add-ins menu, click Add-in Manager.
  5. In the Available Add-ins list, click VBA Package and Deployment Wizard.
  6. Under Load Behavior, click to select the Loaded/Unloaded check box, and then click OK.
  7. On the Add-ins menu, click Package and Deployment Wizard.
  8. In the Package and Deployment Wizard dialog box, click Package.
  9. Click Next and accept the defaults until you get to the Package and Deployment Wizard - Included Files page.
  10. Click to select the Include Access Runtime check box, and then continue through the wizard until it is finished.
  11. Open Notepad.
  12. Type the following:
    [Autorun]
    ICON=Setup.exe
    OPEN=Setup.exe
  13. On the File menu, click Save As.
  14. In the Save As dialog box, browse to the folder where you created the package.
  15. In the Save as type list, click All Files (*.*).
  16. In File name, box type Autorun.inf.
  17. On the File menu, click Save, and then quit Notepad.
  18. When you are creating the compact disc, copy the contents of the folder containing the package, and place the contents "as is" onto the compact disc. Do not place the folder itself onto the compact disc; only copy the contents of that folder. If the Autorun.inf file is not in the root folder of the compact disc, Autorun is not triggered. In this example, the root folder of the compact disc has the following files and folders:
    Collapse this tableExpand this table
    NameType
    RuntimeFolder
    SupportFolder
    Autorun.infFile
    Northwind.cabFile
    Setup.exeFile
    Setup.lstFile
  19. Load the compact disc onto a target computer that has the Windows Autorun feature turned on. Note that the Setup program starts automatically.

REFERENCES

For additional information about Autorun with compact discs, click the article numbers below to view the articles in the Microsoft Knowledge Base:
136214 How to Test Autorun.inf Files
172078 HOWTO: Enable Autorun for Applications Distributed on CD-ROM
126025 How to Disable Automatic CD-ROM Running and Audio CD Playing

Properties

Article ID: 241264 - Last Review: July 30, 2001 - Revision: 1.2
APPLIES TO
  • Microsoft Office 2000 Developer Edition
Keywords: 
kbappsetup kbhowto kbpdwizard kbwizard KB241264

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com