Kjames Posted December 16, 2003 Share Posted December 16, 2003 Hi, 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. Link to comment Share on other sites More sharing options...
Kjames Posted December 16, 2003 Author Share Posted December 16, 2003 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 More sharing options...
scriptkitty Posted December 18, 2003 Share Posted December 18, 2003 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now