Brian Cryer

 

Cry How To...


Test CD autorun without burning a CD


When producing a CD that will autorun the easiest way to test whether the contents of the autorun.inf file are correct is to blow a CD and try it. However, there are a few other methods that allow you to test the CD autorun without burning a new CD:


Map Network drive (XP)

  1. Create a folder to hold the image of the CD that you wish to test. Be sure that this folder contains an autorun.inf file.
  2. Open the properties for the folder (using Windows explorer) and share the folder.
  3. Map a network drive to the shared folder (be sure to assign it a drive letter). The autorun.inf file will now run.

For example (and this is only an example of the above):

  1. Assuming the CD image you wish to test is in the folder "C:\MyThings\MyCD".
  2. Right click on "C:\MyThings\MyCD" using Windows Explorer, and select "Properties". Then on the "Sharing" tab select "Share this folder" (the share name will default to the name of the folder which in this example is "MyCD") and click [OK].
  3. Using Windows Explorer select Tools → Map Network Drive ..., select a drive letter (say "Z", but any will do and I would recommend clearing the option to "Reconnect at logon"), for the folder click [Browse ...] and select the local computer and the name of the share created in the step above, then [OK] and [Finish]

Note:

  • This method has been tested under Windows XP only.
  • It has been seen to work on some PCs running XP but not others, this is possibly down to anti-virus settings but this is unclear.

Autorun subst drive (not XP)

The DOS command 'subst' allows a path to be assigned to a drive letter. To use this command open up a new 'command prompt' (either use start > run and enter 'cmd', or run find it under the Programs menu).

Assuming that the CD image that you wish to test is in the folder 'C:\MyThings\MyCD' then (in the command prompt) type:

subst T: C:\MyThings\MyCD

This will associate the drive letter 'T' with the folder 'C:\MyThings\MyCD'. (Any free drive letter can be used, it does not have to be 'T'.) Within windows explorer the 'T' drive will now be listed, whilst it will not automatically run the autorun file by right clicking the drive within explorer the option should be available to 'AutoPlay'. If the option is not available then check that there is an 'autorun.inf' file in the folder and that it is correctly structured.

One thing to note about this mechanism is that Windows appears to cache information about the autorun settings. So if you then edit the 'autorun.inf' file be sure to delete the drive substitution and recreate it before testing your changes. For example:

subst T: /d
subst T: C:\MyThings\MyCD

Otherwise you may find that windows does not pick your changes up.

Note: This has been tested under Windows 98 and Windows 2000. It does not appear to work under Windows XP.


Auto run floppy (95 & 98 only)

In the Microsoft Knowledge Base Article Q136214, Microsoft describes how to configure autoplay for other devices such as floppy disks.

This method only works for Windows 95 and 98. It does not work with other versions of Windows.

A summary of that knowledge base article (Q136214) is presented here:

The registry key:

HKEY_CURRENT_USER\
 Software\
  Microsoft\
   Windows\
    CurrentVersion\
     Policies\
      Explorer\
       "NoDriveTypeAutoRun"

holds a numeric mask for which each bit in the number indicates which types of devices autorun is disabled for:

Logical name Bit Hex Suppresses
DRIVE_UNKNOWN 0 01 Unknown.
DRIVE_NOT_ROOT 1 02 Drives with no root directory.
DRIVE_REMOVABLE 2 04 Removable drives, eg floppy drives.
DRIVE_FIXED 3 08 Fixed disks, i.e. hard disk.
DRIVE_REMOTE 4 10 Remote/Network drives.
DRIVE_CDROM 5 20 CD drives.
DRIVE_RAMDISK 6 40 Ram disk.
  7 80 Not used.

The default is disabled autoplay for DRIVE_UNKNOWN (bit 0), DRIVE_REMOVEABLE (bit 2), DRIVE_REMOTE (bit 4) and bit 7 for future device types. This is 95hex (or 149 decimal).

To enable autorun for floppy drives simply clear bit 2. Assuming the default value of 95hex previously this would mean changing the value to 91hex.

This may require a reboot to take affect. Please remember that this is applicable to Windows 95 and 98 only.


Related how-to notes:


Unless otherwise indicated, these notes are believed to apply to all versions of Windows.