in reply to Re^10: unpacking wmic command's unicode output
in thread unpacking wmic command's unicode output
As a solution, it's useless and therefore wrong.
Hm. That's a bit strong. As a solution, it produces the desired result. Ie. The data in the file is sans unicoding.
The fact that the -CS isn't actually responsible for that--nor even perl itself directly--doesn't detract from the usability of the solution to produce desired result.
As it turns out, wmic process | perl -pe1 > file also produces the desired result, and as its 3 characters shorter I guess that makes it a superiour solution. I would have suggested that; had I thought to have tried it.
It turns out that it just going via a pipe that causes wmic.exe to produce ansi output rather than unicode, so a simple wmic process | tee > file works.
And it's even shorter.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^12: unpacking wmic command's unicode output
by ikegami (Patriarch) on May 12, 2015 at 15:19 UTC | |
|
Re^12: unpacking wmic command's unicode output
by pwatson (Initiate) on May 11, 2015 at 15:02 UTC | |
by BrowserUk (Patriarch) on May 11, 2015 at 15:51 UTC |