Jump to content
Sign in to follow this  
Muzzikap

Problem Executing commandline

Recommended Posts

Muzzikap

I'm playing a bit with autoit. and I'm trying to mount an image in daemon tools using the command line.

Daemon tools help file:

-unmount
allows unmounting images from command line.
Syntax is: -unmount <n>
where 'n' means DVD-ROM device number ('0' - '3' allowed)

When i try to run the line shown below i get the following error returned

Het systeem kan het opgegeven pad niet vinden. >> simple translated by me>>

System cannot find given path

RunWait(@comspec & '/k c:\Program Files\D-Tools\daemon.exe -demount 1')

I guess that the "/k" that i'm using is wrong. I without it an cmd-window is opened and nothing else happens. I hope somebody can tell me what I'm doing wrong and where the /k stands for (perhaps a link with info)

tnxz

Share this post


Link to post
Share on other sites
Muzzikap

Found the problem.

Solved it using the following code that i found on this forum:

$pathToDaemonTools   = "c:\Program Files\D-Tools\daemon.exe"
$pathToIso           = $aImLijst[1]

RunWait ( $pathToDaemonTools & ' -unmount 1' )
RunWait ( $pathToDaemonTools & ' -mount 1, "' & $pathToIso & '"' )
Edited by Muzzikap

Share this post


Link to post
Share on other sites
seandisanti

Found the problem.

Solved it using the following code that i found on this forum:

$pathToDaemonTools     = "c:\Program Files\D-Tools\daemon.exe"
$pathToIso             = $aImLijst[1]

RunWait ( $pathToDaemonTools & ' -unmount 1' )
RunWait ( $pathToDaemonTools & ' -mount 1, "' & $pathToIso & '"' )

<{POST_SNAPBACK}>

cool, thanks for posting the solution, it bugs me when people post a prob then fall off the planet because they resolved it, and others waste time trying to help

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites
LxP

It probably doesn't matter anymore now but I believe that the problem with this code:

RunWait(@comspec & '/k c:\Program Files\D-Tools\daemon.exe -demount 1')

is that you were not surrounding the path to the .EXE in double quotes. This would probably work for you:

RunWait(@comspec & '/k "c:\Program Files\D-Tools\daemon.exe" -demount 1')

Share this post


Link to post
Share on other sites
Muzzikap

It probably doesn't matter anymore now but I believe that the problem with this code:

RunWait(@comspec & '/k c:\Program Files\D-Tools\daemon.exe -demount 1')

is that you were not surrounding the path to the .EXE in double quotes. This would probably work for you:

RunWait(@comspec & '/k "c:\Program Files\D-Tools\daemon.exe" -demount 1')

<{POST_SNAPBACK}>

tnxz for your reply.

Perhaps you or somebody else can tell me what the /k does. I don't get that part of the code.

Share this post


Link to post
Share on other sites
therks

That's a command line switch for cmd.exe or command.com.

/C      Carries out the command specified by string and then terminates

/K      Carries out the command specified by string but remains

Just give this a try:

Start > Run > "cmd /k echo Hello World" (without quotes)

/c does the same thing, but closes cmd.exe right away, so it's useless for displaying things, but handy for doing something like

"cmd /c del C:\temp\*.tmp"

*Edit: Just so you know, @COMSPEC evaluates to whatever the command line utility is for your system (in my case "C:\WINDOWS\system32\cmd.exe" on my old Win98 system it would have been "C:\Windows\Command.com")

*Edit2: Wow, 2 more replies while I typed mine.. I took too long I think..

Edited by Saunders

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.