abqbill's exec15/exec.exe stdout not re-directed when -c switch is used
-
viernes, 04 de mayo de 2012 4:01
When I run the following from a batch file --
"c:\program files\exec15\exec.exe" -c -w -e -- %cmd% %2 %3 %4 %5 > %logfile%
the %cmd% command output is not redirected to %logfile%. The -e report DOES go to %logfile%. When I run the same without the -c, both the %cmd% output and the -e report are redirected to %logfile%.
Also, (with -c) the %cmd% console window flashes briefly and then goes away when the %cmd% finishes.
Todas las respuestas
-
viernes, 04 de mayo de 2012 8:30
Hard to say without knowing what the following might be:
- exec.exe
- %cmd%
- %2, %3, %4, %5
- %logfile%Also, what do the -c -w -e -- switches mean?
-
viernes, 04 de mayo de 2012 14:25Moderador
Hi Oberwald/Pegasus,
He's talking about exec15.zip.
Hi Phil,
What's your question? (You posted your observations, but not a question.)
Bill
-
viernes, 04 de mayo de 2012 14:32
Bill, how did you find me out?!Hi Oberwald/Pegasus,
-
viernes, 04 de mayo de 2012 14:38Moderador
Bill, how did you find me out?!
It was a good guess <grin>
Bill
-
viernes, 04 de mayo de 2012 19:16
is this normal behavior
-
viernes, 04 de mayo de 2012 19:22Moderador
Is what normal behavior?
Bill
-
viernes, 04 de mayo de 2012 19:29Moderador
OK. Let me try to guess what you mean...
If you use a command like:
exec -c -e -- command > output.txt
The command's output isn't stored in output.txt, but the program's elapsed time is stored in output.txt.
-c means "create a new console." This new console has its own stdout, which is separate from the stdout in the console from which you executed the exec command. So of course, the new console's output won't appear in output.txt.
Does this answer your question?
Bill
- Propuesto como respuesta Bill_StewartMicrosoft Community Contributor, Moderator lunes, 07 de mayo de 2012 14:11
- Marcado como respuesta IamMredMicrosoft Employee, Owner lunes, 14 de mayo de 2012 20:08
-
viernes, 04 de mayo de 2012 21:16
http://www.westmesatech.com/files/exec15.zip
I don't think the specific values in the variables have any bearing on the issues. %cmd% contains the name of a batch file that exec15 will run. %logfile% is the path/filename of %cmd%'s redirected stdout.
-
viernes, 04 de mayo de 2012 21:19Moderador
Hi,
I don't think we're communicating very well. What's your question? (Please be as concise and specific as possible.)
Bill
-
viernes, 04 de mayo de 2012 22:03Never mind. This is clearly beyond my level of expertise. I'll find another way.
-
sábado, 05 de mayo de 2012 8:19
Never mind. This is clearly beyond my level of expertise. I'll find another way.
Don't give up. Just describe what it is you aer trying to do. Mutliple redirection issues are beyond most peoples level. If you explain what you are trying to do I am sure Bill will help you if it is possible.
¯\_(ツ)_/¯
-
lunes, 07 de mayo de 2012 14:10Moderador
Never mind. This is clearly beyond my level of expertise. I'll find another way.
Hi,
Sorry -- again -- another way to do what? As jrv said, I am glad to help, but 1) I can't read your mind and 2) I can't see your screen. If you have a question, feel free to ask, but please include all relevant information such as: What you want to do, what you tried that didn't work (and specifically how it didn't work), and so forth. I wrote an article that should help you ask a better question:
How to ask questions in a technical forum
Bill

