Using the Registry

The registry is a feature of Windows 95 that supersedes the initialization (.ini) and application configuration files. For more information about registry manipulation application programming interfaces (APIs), see the documentation included with the Microsoft Win32 SDK.

If your title records and uses initialization information, you can use the registry to store and retrieve this information. Your startup application can use the information in the registry to determine whether the product needs to be installed:

·If your product is being used for the first time (no registry entries), present a dialog box that lists the setup options.

·If your product is installed (listed in the registry), present a dialog box with just the OK and Cancel buttons.

For debugging purposes, you can enable a machine to read the Autorun.inf file from a floppy drive by changing the system registry. Use the following procedure to do this:

1Use the REGEDIT tool to search for the string "auto."

The results of the search should be in the HKEY_CURRENT_USER key under the following subkey:

\Software\Microsoft\Windows\CurrentVersion\Policies \Explorer

2Change the data of the NoDriveTypeAutoRun value from 0000 95 00 00 00 to 0000 91 00 00 00.

This change enables AutoPlay on any drive; however, you must select AutoPlay when working with a floppy disk to run the startup application. You can double-click the floppy disk icon, or select the floppy disk icon and access the shortcut menu to start AutoPlay.

3After completing your tests of Autorun.inf, reset the value of NoDriveTypeAutoRun to 0000 95 00 00 00.

Important The capability of implementing AutoPlay on floppy disks is provided solely to help programmers debug their Autorun.inf files before burning the CD. AutoPlay is intended for public distribution on CD only.

There is an inherent danger of this technique spreading viruses through the floppy disks. Therefore, it is appropriate to suspect that any publicly distributed floppy disks that contain Autorun.inf files are contaminated.