How to Test Autorun.inf Files
Retired KB Content Disclaimer
By default, Windows 95 and Windows 98 only check for an Autorun.inf file when a CD-ROM disc is inserted into the CD-ROM drive. However, you may want to test for syntax and logic errors before burning a CD-ROM disc. This article explains how.
However, by changing a setting in the Windows 9x registry, you can have theShell use AutoPlay on any media, including shared network drives and floppydisks.
The registry key that needs to be modified is:
HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\ Explorer\ "NoDriveTypeAutoRun"This key, which is of type REG_BINARY, consists of four bytes. The firstbyte is a bitmask defining which drive types should be AutoRun. Theother three bytes should be set to zero (0).
The bits in the bitmask correspond to these constants:
Type BitDRIVE_UNKNOWN 0DRIVE_NO_ROOT_DIR 1DRIVE_REMOVABLE 2DRIVE_FIXED 3DRIVE_REMOTE 4DRIVE_CDROM 5DRIVE_RAMDISK 6Setting a bit in the bitmask prevents you from using AutoPlay with thecorresponding drive type. By default, the value in the registry is 0x95.Bits 0, 2, 4 and 7 are therefore set, which means that drive typesDRIVE_UNKNOWN, DRIVE_REMOVEABLE, and DRIVE_REMOTE don't use AutoPlayinformation. (Bit 7 is set to cover future device types.) Altering thisregistry value thus allows you to test Autorun.inf files from a floppy disk(DRIVE_REMOVEABLE), network drive (DRIVE_REMOTE), and so on. For example,to be able to test AutoPlay from a floppy disk, set the value of the firstbyte to 0x91 to enable AutoPlay for floppy disks.
NOTE: Most floppy disk drive controllers do not currently recognize when afloppy disk has been inserted. To test AutoPlay on a floppy disk, firstalter the registry setting so that bit DRIVE_REMOVEABLE is not set, startthe Windows Explorer, insert the floppy disk, and press the F5 key torefresh the display.
To test the Autorun.inf file on a given disk, using the right mouse button,click the icon for the drive in the Windows Explorer. The effects of theAutorun.inf file should be visible in the context menu.
Αναγνωριστικό άρθρου: 136214 - Τελευταία αναθεώρηση: 05/11/2007 17:43:56 - Αναθεώρηση: 2.3
- kbfaq KB136214