Jump to content

Capture runwait output


 Share

Recommended Posts

Hello,

i am trying to capture the output of the following command to a file or variable with AutoIT3 (build 103).

RunWait(@ComSpec & " /c " & @SystemDir & "\CScript.exe " & $DestDir & "\script.vbs >>" & $DestDir & "\script.log", $DestDir, @SW_MINIMIZE)

If i look inside the file, i can see only the first lines. The rest was never written to this file. Is there an other way to capture the output ?

Thanks.

Bernd

Link to comment
Share on other sites

if you do the same thing from the commandline without autoit, do you get the same result??

if so, you can try to redirect stderr as well using a syntax like 2>

a simple example...

on a commandline type the following:

dir >> ok.txt 2>> err.txt

this will produce two files. ok contains dirlisting and err is empty.

Now type this:

dir bogus >> ok.txt 2>> err.txt

look again. the ok contains the previous plus a few lines, but the err file now contains an errormessage.

type:

dir bogus

and compare the output.

This is probably not anywhere near the solution you are looking for but it's nice-to-know.

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...