PiqueABoo Posted May 22, 2007 Posted May 22, 2007 I'm a pragmatist and just changed to Exec, StdOut.ReadAll and a file write to get what I wanted, but for future ref. does anyone know why using Run like this doesn't work? x.Run("fred.exe inputfile > outputfile", 0, true); That's jscript, but I imagine the issue is generic. The exe runs and if I change that 0 to 1 I get to see a transient dos box in which I see the output i.e. the redirect to file doesn't happen
PiqueABoo Posted May 22, 2007 Author Posted May 22, 2007 Ah ha! If you want stdout redirection to work you have to do it something like this: x.Run("%comspec% /c fred.exe inputfile > outputfile", 0, true);
ChrisH Posted May 23, 2007 Posted May 23, 2007 If I am doing a complicated command line I tend to find things work easier if I put that into a string and then use that eg myCmd= "%comspec% /c fred.exe inputfile > outputfile" x.Run(myCmd,0, true);
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