Jump to content

Recommended Posts

Posted (edited)

Hello all,

I have been trying to run a cmd line program using the following line but it would come up with the error saying it couldnt find the command

$PID=RunWait(@ComSpec & "/C hinfo.exe app.mux > hinfo.txt",$current_directory,@SW_HIDE)

BUT, this line DOES work

$PID=RunWait("cmd.exe /C hinfo.exe app.mux > hinfo.txt", $current_directory,@SW_HIDE )

They do exactly the same thing, can anyone point out anything silly that i am missing?

Thanks

Regards

Edited by sambuddy
Posted (edited)

$PID=RunWait(@ComSpec & " /C hinfo.exe app.mux > hinfo.txt",$current_directory,@SW_HIDE)

You need to leave space between the first quotes and /C.

Edit:

Welcome to AutoIt... ;)

Edited by Danny35d
AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line
Posted

Hello all,

I have been trying to run a cmd line program using the following line but it would come up with the error saying it couldnt find the command

$PID=RunWait(@ComSpec & "/C hinfo.exe app.mux > hinfo.txt",$current_directory,@SW_HIDE)

BUT, this line DOES work

$PID=RunWait("cmd.exe /C hinfo.exe app.mux > hinfo.txt", $current_directory,@SW_HIDE )

They do exactly the same thing, can anyone point out anything silly that i am missing?

Thanks

Regards

;)

Oh *&%X*%#@$, So near yet so far.

Thanks

That works

Posted (edited)

;)

Oh *&%X*%#@$, So near yet so far.

Thanks

That works

Nah, you just were not spaced out enough.... :-)

Edit: Welcome to the forum....

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...