
Using WshShell.Run to launch console app
I'm trying to run a console app from a WSH script on Win95. Both
cscript.exe and wscript.exe have the version number 5.0.531.7.
Here's the line:
iResult = WshShell.Run("sed -e ""/^$/q"" test.ngp > temp.txt",_
1, True)
If I were attempting to execute this in a DOS batch file or directly
at the console prompt, it would look like this:
sed -e "/^$/q" test.ngp > temp.txt
When the script runs, a console prompt flashes on the screen, but I
can't tell what is happening. The file temp.txt is not being created,
so I know that something is failing. The return value is 0 and no VB
error is raised. The command works perfectly from a batch file or
console prompt.
I've also tried using fully qualified path names:
iResult = WshShell.Run("c:\bat\usr\local\wbin\sed -e ""/^$/q""
D:\Temp3\test.ngp > D:\Temp3\temp.txt", 1, True)
That doesn't help.
What am I doing wrongly?
--
Charles Calvert | Software Design/Development
Celtic Wolf, Inc. | Project Management
http://www.*-*-*.com/ ;| Technical Writing
(703) 580-0210 | Research