View Full Version : Script to set drive letter

08.08.2004, 20:19
Operating System: XP SP1a
Burning Software: Nero 6
Anti-virus Software: AVG
DAEMON Tools Version: 3.46

Love Daemon tools, never had a problem except the following;

I want to use Daemon Tools in schools. I use ActiveDirectoy to do roll out and this works fine with the MSI. Problem is, I never know what the drive letter is going to be so configuring software can be a problem. I need to be able to either;

1 - Specify drive letter in the MSI at install time
2 - Execute a script which changes the drive letter. (I have considered trying AUTOIT, but I have never used if before and I think there must be a better way).

The way I see it, a script would need to work as follows;

1 - Identify all 'DaemonTools' drives (???)
2 - Obtain the drive ID of these drives (???)
3 - Re map drive letters (HKLM\MountedDevices...)

Can anyone help me ?

(I have already looked at all the 3rd party add-ons including DeamonScript and non of them will do this for me!)


25.08.2004, 16:50
Operating System: XP PRO SP1a
Burning Software: nero, decrypter, iso-recorder, you name it.
Anti-virus Software: Panda
DAEMON Tools Version: 3.46

sry, but I don't have an answer, but think your question is excellent and I would like to know as well (doing similar tasks).....I'll research what I can and keep up w/ this thread.

Have you searched http://groups.google.com ? Thats where I'm going to start.


26.08.2004, 09:12
I have come up against the same problem with the Avantis CD server client. It installs devices and lets Windows assign the drive letters.

I have developed a quick and dirty VB script which (in conjunction with the excellent JSSYS3 component) scans the registry key (HKLM\System\MountedDevices) looking for '\DosDevice\...' entries with certain text encoded in the value. When found, the value is deleted and recreated with the correct drive letter in the value name. The new drive letters take effect following a reboot.

I have not tested the script against Daemon Tools yet, but I can so no reason in principle why it should not work. It would just be a question of fine tuning the search values.

I notice that the Daemon Tools interface allows instant changing of the drive letters (as does Windows Disk Manager), but I do not know if this API is accessible from script. Presumably a component could be produced to perform these functions.

Volunteers please !


03.11.2004, 14:42
Operating System: XP Pro
Burning Software: Nero
Anti-virus Software: Norton
DAEMON Tools Version: 3.47

I have been playing around with BTEWin and have found it extremely useful. The following Daemon commands are available:

Mount device,disc image file : Mounts the given disc image file in the desired device. This command requires Daemon Tools to be installed.
The device value can also be set to *, so the image file will be mounted in all available drives. Example : Mount *,mycd.iso .
Unmount device : Unmounts the image that is currently mounted in the given device. This command requires Daemon Tools to be installed.
The device value can also be set to *, so all images will be unmounted.
Daemonoptions SECUROM SAFEDISC LASERLOK RMPS AUDIO ALLEMU : Sets the appropriate options for Daemon Tools. These options can also be disabled by appending off to them. Allemu controls all the emulation options at once. Example : Daemonoptions audiooff . These options can be combined as desired.
Daemondrives number of virtual drives : Sets the number of virtual CD/DVD drives emulated by Daemon Tools.
Daemonid Vendor, Model, Revision : Sets the name of the virtual SCSI devices emulated by Daemon Tools. There's a limit of 8 characters for the vendor string, 16 characters for the model string and 4 characters for the revision string.
Daemonvolume device,volume level : Sets the cd audio playback volume for the given device. The device value can be set to *, so the same value will be set for all devices. The volume level value can also be set to ON or OFF, so volume control will be enabled or disabled without changing its value. By default manual volume control is enabled with this command. The volume level value must be in the range 0-255. Example : Daemonvolume 0, 255 .
Daemonregion device, DVD region : Sets the DVD region for the given device. The device value can be set to *, so the DVD region will be set for all devices. The DVD region must be in the range 0-8 , being 0=none.
Daemonletter device, drive letter : Changes the letter for the given virtual device if possible. Example : Daemonletter 0, X .
Pushdaemon : Saves the complete Daemon Tools status for a later recall using Popdaemon. Everything is saved, included the mounted images, number of devices, emulation parameters, ...
Popdaemon : Restores the complete Daemon Tools status that must have been previously saved by a call to Pushdaemon.

I have a small vbasic program that borrows CD's from a server based library. (Small MySQL database holds CD info and current leases)

This program get's a lease for a CD then calls a BTEWin batch file. This file:

- saves current screen resolution
- changes screen resolution (provided by DB)
- mounts the CD image (provided by DB)
- launches the .exe (provided by DB)
- Waits for .exe to terminate
- unmounts CD
- restores previous screen resolution

Having just found that this wonderful tool can also set the drive letter, I will be adding a command to the batch file. I would prefer to have been able to write a WSH script instead, but this works.

Many thanks to JPISoft for their product and help. :D