gcue Posted November 7, 2008 Posted November 7, 2008 (edited) i am having trouble using a dos program and piping to a directory here's what i got (pslist- lists active processes on a remote machine) $file = (@TempDir & "\pslist.txt") RunWait(@ScriptDir & "\pslist.exe " & "\\" & $asset & " > " & $file) here's the syntax which works without using autoit: pslist.exe \\assetnumber > c:\temp\pslist.txt i cant find the file *sigh* i've checked the remote machine's temp dir, my temp dir, and the scriptdir and i dont see where pslist.txt went *sigh* Edited November 7, 2008 by gcue
Developers Jos Posted November 7, 2008 Developers Posted November 7, 2008 (edited) You need to use @Comspec to be able to use the pipe characters. Jos Edited November 7, 2008 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
gcue Posted November 7, 2008 Author Posted November 7, 2008 i tried: RunWait(@ComSpec & @ScriptDir & "\pslist.exe " & "\\" & $asset & " > " & $file) but that didnt work either.
Developers Jos Posted November 7, 2008 Developers Posted November 7, 2008 (edited) Try something like this: RunWait(@ComSpec & ' /c "' & @ScriptDir & '\pslist.exe" "\\' & $asset & '" > ' & FileGetShortName($file)) Edited November 7, 2008 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
gcue Posted November 7, 2008 Author Posted November 7, 2008 hmm im getting a blank list of processes - a file however ISS getting created in my temp dir.. wohoo!
gcue Posted November 7, 2008 Author Posted November 7, 2008 figured it out! i needed to take some of the quotes out many many thanks!
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