Jump to content

RunWait Redirection Problems


Kjames
 Share

Recommended Posts

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

Cheers.

Link to comment
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.")
else
msgbox(1,"my system path is" & @SystemDir , "net.exe should be here, but isn't.")
endif

or check your " and '

AutoIt3, the MACGYVER Pocket Knife for computers.

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