AHK + Daemon tools. Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
burton2
Posts: 21
Joined: 18 Sep 2017, 10:20

AHK + Daemon tools.

08 Nov 2017, 13:26

Win7 and DTLite 10.6

Iv been trying to mount an ISO using AHK but cant seem to get it to work.
Using a .bat with the following works fine.

Code: Select all

cd "C:\Program Files\DAEMON Tools Lite"
DTAgent.exe -unmount F
DTAgent.exe -mount_to F, "C:Necronomicon CD2.iso"
Iv tried the following with AHK:

Code: Select all

SetWorkingDir %A_ScriptDir%

Daemon_dir=C:\Program Files\DAEMON Tools Lite

SetworkingDir, %Daemon_dir%
Run, DTAgent.exe -unmount F
Run, DTAgent.exe -mount_to F, "C:\Necronomicon CD2.iso"
This will unmount fine but wont mount the ISO. Iv tried many things like swapping drive letter for number. etc etc. Removing a virtual drive also works ok. But just cant seem to mount anything. Would be very grateful for some help. Please.
Noesis
Posts: 301
Joined: 26 Apr 2014, 07:57

Re: AHK + Daemon tools.  Topic is solved

08 Nov 2017, 23:15

It's the comma in the mount line. It appears you need a comma in the command run from the bat file, when it comes to ahk the comma is indicating the next parameter of the run command so isn't being passed as part of the command but is rather saying that "C:\Necronomicon CD2.iso" is the working directory. You need to escape the comma so it is treated as part of the command to run i.e.

Code: Select all

Run, DTAgent.exe -mount_to F`, "C:\Necronomicon CD2.iso"  ; FYI, notice the angle on the ` (escape char), it's a back-tick not an apostrophe.
burton2
Posts: 21
Joined: 18 Sep 2017, 10:20

Re: AHK + Daemon tools.

09 Nov 2017, 07:31

Excellent. My script works great now. Thank you.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 377 guests