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. But if you don't then get it right first time (or second ...) then you can end up wasting a number of CDs.
There are alternatives to writing a new CD. The following techniques show how to test a CD autorun without the need to burn a new CD:
- CD emulator (XP and later)
- Map Network drive (XP only)
- Autorun subst drive (9x, NT and W2K only)
- Autorun floppy (95 and 98 only)
With this approach you first create an ISO image of the CD and then mount it using a CD emulator. The disadvantage of this approach is that it requires third party software - but you should be able to get all the software you need for free.
First create an ISO image
An ISO image is a single .iso file which contains an image of the (real or proposed) CD.
There are many software packages available (both free and paid for) which will allow you to create an ISO image. If you do not already have a preferred then the simplest (freeware) application may well be Folder2Iso:
- Download Folder2Iso from www.trustfm.net/divx/SoftwareFolder2Iso.php. (This is a third party site which I have no affiliation with.) It comes as a .zip file and simply needs to be unzipped and run, there is no need to install it.
- Create a folder to hold the files that will represent an image of the CD that you will want to create/test. If you are testing the autorun.inf file then be sure that this folder contains the autorun.inf file.
- Run Folder2Iso, select the folder that contains your files and the location and name of the .iso file it is to generate and then click [Generate Iso]. It will take a few moments to generate an .iso file.
Then mount it using a CD emulator
Once you have a .iso file you can then mount it using a CD emulator. There are a number of both free and paid for drive emulators. The following are free ones which I have used and found effective (needless to say you only need one):
- Virtual CloneDrive.
Download from: www.slysoft.com/en/virtual-clonedrive.html
This is freeware. Once you have it installed you can simply double click on the .iso file to mount it - or right click on the CloneDrive icon in the notification area to mount or eject a .iso image.
Download from: http://arainia.com/software/gizmo/overview.php?nID=4
Gizmo is a set of tools, one of which is "Gizmo drive" which provides CD emulation and can be used to mount .iso images.
Once you have a CD emulator installed, you simply need to mount your .iso image into one of the virtual CD drives. The CD should then auto-play (assuming you don't have this feature disabled in Windows), allowing you to test your autorun and the CD.
- I have tested this technique under Windows XP, Windows Vista and Windows 7. Provided the CD emulator you are using supports it then I see no reason why it should not also work for other versions of Windows.
- 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.
- Open the properties for the folder (using Windows explorer) and share the folder./li>
- 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):
- Assuming the CD image you wish to test is in the folder "
- 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].
- 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]
- 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.
This technique works in Windows 95, 98, ME and Windows N2 and Windows 2000. It does not work in Windows XP and later.
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 '
then (in the command prompt) type:
subst T: C:\MyThings\MyCD
This will associate the drive letter 'T' with the folder '
(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
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 work under Windows XP.
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
0 01 Unknown.
1 02 Drives with no root directory.
2 04 Removable drives, eg floppy drives.
3 08 Fixed disks, i.e. hard disk.
4 10 Remote/Network drives.
5 20 CD drives.
6 40 Ram disk. 7 80 Not used.
The default is disabled autoplay for
DRIVE_REMOVEABLE (bit 2),
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.
About the author: Brian Cryer is a dedicated software developer and webmaster. For his day job he develops websites and desktop applications as well as providing IT services. He moonlights as a technical author and consultant.