Normal Topic [Solved] @RedirectProcess (Read 421 times)
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
[Solved] @RedirectProcess
Jan 17th, 2008 at 4:39pm
Print Post Print Post  
What's wrong with this code? It just displays an empty slate, rather than a directory listing.

(This is one of the examples in the guide.)

Code
Select All
var vResult as string

vResult = @RedirectProcess("DIR", "")
WriteLn(vResult) 

« Last Edit: Jan 17th, 2008 at 9:38pm by Hammer »  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: @RedirectProcess
Reply #1 - Jan 17th, 2008 at 5:03pm
Print Post Print Post  
Yeah, we've got a recent documentation note on this. The example works on our systems because we have DIR as a standalone exe. You probably don't as it is embedded in your command shell.

Try this instead:
Code
Select All
@RedirectProcess("cmd /C DIR", "")  

  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: @RedirectProcess
Reply #2 - Jan 17th, 2008 at 9:03pm
Print Post Print Post  
Aaah, that fixes it. Smiley

Thanks for the quick response.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged