Jump to content
Sign in to follow this  

RunWait Redirection Problems

Recommended Posts



I need to run the command in AutoIT v3.0

RunWait("Net accounts > c:\\accts.txt")

This command does not fail but it fails to pipe the results to the specified file. Is it not possible to redirect the output to a file

Thanks. :whistle:

Share this post

Link to post
Share on other sites

RunWait(@comspec & " /c Net accounts > c:\accts.txt","",@SW_HIDE)

Larry -

Thanks for your quick reply,

This command line still fails. I now get a popup box on screen that says:

"ERROR: Unable to execute the external program.

The system cannot find the path specified"

Is there anything else I can try ??


Share this post

Link to post
Share on other sites

Works fine for me, I assume Net.exe is in your path right?

Mine is in c:\windows\system32.

Does it run from command line?

What OS?

RunWait(@comspec & " /c Net accounts > c:\accts.txt","",@SW_HIDE)

RunWait(@comspec & " /c c:\windows\system32\Net.exe accounts > c:\accts.txt","",@SW_HIDE)

RunWait(@comspec & " /c " & @SystemDir & "\Net.exe accounts > c:\accts.txt","",@SW_HIDE)

or try this

$x=FileExists ( @SystemDir & "\net.exe" ) 
if $x=1 then
msgbox(1,"my system path is" & @SystemDir , "net.exe is here.")
msgbox(1,"my system path is" & @SystemDir , "net.exe should be here, but isn't.")

or check your " and '

AutoIt3, the MACGYVER Pocket Knife for computers.

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.