Jump to content
Sign in to follow this  
Aelc

@COMspec double quotes don't appear in cmd - (Moved)

Recommended Posts

I think i'm actually tilted

I'm on a DaemonTools mounter

I can remove and add VirtualDrives but i want to "--get_letter" and write the answer to a txt.

I used 

$command = '"C:\Program Files\Daemon Tools Lite\DTCommandLine.exe" --add --type "dt"'
RunWait ( $command )

for adding and removing but if i want to get the txt file i have to use

 

$command = '"C:\Program Files\Daemon Tools Lite\DTCommandLine.exe" --get_letter --type "dt" --number 1 >' & @ScriptDir & '\check_VD.txt'
RunWait ( @ComSpec & " /k " & $command )

i guess

 

if i insert this with 

Send ()

it works on a manually opened cmd

 

but cmd tell me it's without quotes :o

-> "C:\Program" couldn't find  ( like i forgot the Quotes ) 

 

Or i can't execute files with @comspec ?

 

Thank You in advance

Edited by Aelc

why do i get garbage when i buy garbage bags? <_<

Share this post


Link to post
Share on other sites

Already got it :oops:

 

$command = '""C:\Program Files\Daemon Tools Lite\DTCommandLine.exe" --get_letter --type "dt" --number 1 >' & @ScriptDir & '\check_VD.txt"'
RunWait ( @ComSpec & " /k " & $command )

 

had to quote the whole command again :sweating:

sorry!

SOLVED


why do i get garbage when i buy garbage bags? <_<

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...