PDA

View Full Version : Virtual drives count



Brainstormz
03.09.2005, 14:40
Operating System: Windows XP SP2
Burning Software: Ahead Nero 6.6.0.6; Alcohol 120%
Anti-virus Software: McAfee 2005
DAEMON Tools Version: 3.47

Hi,

I need to know how can I get the number of available virtual drives. I've used DaemonScript to mount image files but DeviceCount feature has one problem: If I have 5 virtual drives available and I have a DaemonScript with


DeviceCount|3|

it will set the number of virtual drives to 3 althought it's not necessary.

AlcoholSoft has AxCmd.exe that allows Alcohol virtual drives count but it doesn't count Daemon drives...

BTW: Anyone knows DaemonScript command line? (is it available?)

Underheaven
03.09.2005, 14:49
So you want to programatically(scripting/programming) determine if there is an Alcohol 120% or DAEMON Tools virtual drive available with no mounted image. If no virtual drives are available then increase the drive count of either Alcohol 120% or DAEMON Tools by 1. Then mount a specified image file onto the drive letter of the newly created virtual drive.


Is that correct? I'm not familiar enough with all the scripting addons to know if this is possible, hopefully someone will reply who does.

Brainstormz
04.09.2005, 01:02
So you want to programatically(scripting/programming) determine if there is an Alcohol 120% or DAEMON Tools virtual drive available with no mounted image
In fact I only need to determine how many drives are available, no matter if thery're mounted or not.

My problem is that if I use a script with a line like this

DeviceCount|3|
and some user has 5 available drives, it will reduce the number of available drives to 3 although it's not necessary

Jaime
04.09.2005, 09:49
Operating System: _
Burning Software: _
Anti-virus Software: _
DAEMON Tools Version: _

I guess that a BTEWin script will fit your needs. What you need to use is the following variable: _DAEMONDRIVES .

Example:

if!(compare %_DAEMONDRIVES=2) daemondrives 2

Brainstormz
04.09.2005, 12:40
if!(compare %_DAEMONDRIVES=2) daemondrives 2

Jaime, sorry if I'm wrong, but this only works for Daemon drives, correct? And if some user has Alcohol AND Daemon drives? Perhaps I have to use two different methods to count virtual drives. One for Alcohol other for Daemon... What do you think?

Brainstormz
10.09.2005, 00:08
Jaime,

I've been using BTEWin and I've writed a BTEWin batch file to get the number of Daemon drives. It looks like this:

if(compare %_DAEMONDRIVES>0) Messagebox %_DAEMONDRIVES
set regfile=%@UNIQUEFILE[%tmp%\btewin.reg]
filetowrite %%regfile%%
writeline REGEDIT4
writeline [HKEY_LOCAL_MACHINE\Software\BSZ Launcher\Settings]
writeline "NumDrivesDAEMON"="%_DAEMONDRIVES"
Regedit /s %%regfile%%
waitforprogram
:end
del %%regfile%%
Now I'm trying to run it even if BTEWin is not installed in user's system. So how can I run this in this conditions? I've tried to run "BTEExec.exe NumDrivesDAEMON.bte" but it doesn't work...

Jaime
10.09.2005, 09:49
You need to use the --bte command line switch.

So the command line should look like: bteexec.exe --bte NumDrivesDAEMON.bte

Brainstormz
10.09.2005, 14:07
Hi Jaime,

Once again you've been very useful. Although you answered quickly my question, I've been trying some workaround and write this:

BTEExe.exe --cmdline set regfile=%@UNIQUEFILE[%tmp%\btewin.reg]^filetowrite %%regfile%%^writeline REGEDIT4^writeline [HKEY_LOCAL_MACHINE\Software\BSZ Launcher\Settings]^writeline "NumDrivesDAEMON"="%_DAEMONDRIVES"^Regedit /s %%regfile%%^waitforprogram^del %%regfile%%
As you know, this was possible because I didn't use Goto, Gosub, Patchfile, Patchmem, Binarywrite, Createlink or other commands that make use of sub-scripts.

Thanks for all your replies. Now I've finished my application and I can count Alcohol drives and DT drives. At this moment my app detects Alcohol 52% and 120% and Daemon Tools, count their drives and auto-create a DaemonScript that is executed my DaemonScript.exe. If the number of drives is less than the needed a DeviceCount command is inserted in the script.

Hasta...