vbgunz
24th November 2005 01:55 UTC
How to use < OR > with ExecWait?
Hello,
I've come across a small issue. When trying to print out or read in with ExecWait using < OR >, the command always fails. I am pretty much hit in figuring this out. Anybody have any ideas? Some help is really appreciated!
--
Best Regards
Victor B. Gonzalez
kichik
24th November 2005 13:22 UTC
Input and output redirection is a feature of the command line processor. You should execute your command using it.
ReadEnvStr $0 COMSPEC
ExecWait '$0 /C blah > blah'
vbgunz
24th November 2005 14:20 UTC
Thanks Kichik,
It works and I'll use it but I have a question...
ReadEnvStr $0 COMSPEC
ExecWait '$0 /C blah.exe --import < blah'
works *but*
ReadEnvStr $0 COMSPEC
ExecWait '$0 /C "C:\blah.exe" --import < blah'
doesn't. To get around it,
ReadEnvStr $0 COMSPEC
SetOutPath C:\
ExecWait '$0 /C blah.exe --import < blah'
Do I have to SetOutPath before using ExecWait? And then, only address blah.exe as blah.exe and not "C:\blah.exe". When ever I use the quotes around the first path and program "C:\blah.exe" I get an error. To work around it, I so far need to SetOutPath then just /C blah.exe... Is this correct?
Thank you Kichik!
kichik
24th November 2005 14:29 UTC
Using SetOutPath and then ExecWait is OK. It'll also make sure the `blah` file is found.
vbgunz
24th November 2005 14:37 UTC
Thank you Kichik!