Jump to content

DOS command and send output to files


wogok
 Share

Recommended Posts

i tried to run program.exe in DOS and output to a.log using ">a.log".

Without the ">a.log" everything works fine, but once i added it in the program seems to be not running.....

:)

ShellExecuteWait("program.exe" , "file.txt  -parameter1 -parameter2 > a.log ", @SW_HIDE)

;program.exe path is already set in env. variables.

Link to comment
Share on other sites

i tried to run program.exe in DOS and output to a.log using ">a.log".

Without the ">a.log" everything works fine, but once i added it in the program seems to be not running.....

:)

ShellExecuteWait("program.exe" , "file.txt  -parameter1 -parameter2 > a.log ", @SW_HIDE)

;program.exe path is already set in env. variables.

try to rephrase it...

in DOS cmd window, these commands are needed: >program file.txt -parameter1 -parameter2 >a.log

how to do it in autoit?? (the execution must be completed before continue, i guess only can use either RunWait or ShellExecuteWait)

RunWait(@ComSpec & "/c" & "program.exe file.txt  -parameter1 -parameter2 > a.log" ,@SW_HIDE)

i don't get any error but the program is not running.

Link to comment
Share on other sites

RunWait(@ComSpec & " /c program.exe file.txt -parameter1 -parameter2 > a.log" ,"",@SW_HIDE)

*edit: oops, forgot space on other side of /c too

Edited by ascendant
Link to comment
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
 Share

  • Recently Browsing   0 members

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