How to capture output of “pnputil.exe -e”

Question :

How to capture output of “pnputil.exe -e”,

Answer :

How do I capture the output of “%windir%/system32/pnputil.exe -e”?
(assume windows vista 32-bit)

Bonus for technical explanation of why the app normally writes output to the cmd shell, but when stdout and/or stderr are redirected then the app writes nothing to the console or to stdout/stderr?

C:WindowsSystem32>PnPutil.exe --help  Microsoft PnP Utility {...}    C:WindowsSystem32>pnputil -e > c:foo.txt    C:WindowsSystem32>type c:foo.txt    C:WindowsSystem32>dir c:foo.txt   Volume in drive C has no label.   Volume Serial Number is XXXX-XXXX     Directory of c:    09/10/2008  12:10 PM                 0 foo.txt                 1 File(s)              0 bytes  

,

Doesn’t seem like there is an easy way at all. You would have to start hooking the call to WriteConsole and dumping the string buffers. See for a similar discussion.

Read More  What good technology podcasts are out there?

Of course, if this is a one off for interactive use then just select all the output from the command window and copy it to the clipboard. (Make sure you cmd window buffer is big enough to store all the output).

That’s the answer How to capture output of “pnputil.exe -e”, Hope this helps those looking for an answer. Then we suggest to do a search for the next question and find the answer only on our site.

Disclaimer :

The answers provided above are only to be used to guide the learning process. The questions above are open-ended questions, meaning that many answers are not fixed as above. I hope this article can be useful, Thank you

Read More  iPhone web applications, templates, frameworks?