Sign in to follow this  
Followers 0
wogok

DOS command and send output to files

3 posts in this topic

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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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

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  
Followers 0