abqbill's exec15/exec.exe stdout not re-directed when -c switch is used
-
Freitag, 4. Mai 2012 04: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.
Alle Antworten
-
Freitag, 4. Mai 2012 08: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?
-
Freitag, 4. Mai 2012 14:25Moderator
Hi Oberwald/Pegasus,
He's talking about exec15.zip.
Hi Phil,
What's your question? (You posted your observations, but not a question.)
Bill
-
Freitag, 4. Mai 2012 14:32
Bill, how did you find me out?!Hi Oberwald/Pegasus,
-
Freitag, 4. Mai 2012 14:38Moderator
Bill, how did you find me out?!
It was a good guess <grin>
Bill
-
Freitag, 4. Mai 2012 19:16
is this normal behavior
-
Freitag, 4. Mai 2012 19:22Moderator
Is what normal behavior?
Bill
-
Freitag, 4. Mai 2012 19:29Moderator
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
- Als Antwort vorgeschlagen Bill_StewartMicrosoft Community Contributor, Moderator Montag, 7. Mai 2012 14:11
- Als Antwort markiert IamMredMicrosoft Employee, Owner Montag, 14. Mai 2012 20:08
-
Freitag, 4. Mai 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.
-
Freitag, 4. Mai 2012 21:19Moderator
Hi,
I don't think we're communicating very well. What's your question? (Please be as concise and specific as possible.)
Bill
-
Freitag, 4. Mai 2012 22:03Never mind. This is clearly beyond my level of expertise. I'll find another way.
-
Samstag, 5. Mai 2012 08: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.
¯\_(ツ)_/¯
-
Montag, 7. Mai 2012 14:10Moderator
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

