Mixed ascii and unicode output from script - how to get command to output all as ascii?

后端 未结 1 1080
花落未央
花落未央 2021-01-27 15:03

I have a script which is run from a service which is built using C++ and is not built using unicode. This program runs the script below and strangely, the output from the scrip

1条回答
  •  梦毁少年i
    2021-01-27 15:14

    wmic qfe list | find /v "" >> c:\log.txt
    wmic qfe list | findstr "^" >> c:\log.txt
    

    Pipe the output of the wmic command to a find or findstr command (you can also use sort if you don't have problems with the order, or more if your output has less than 65535 lines) before redirecting the output to the file.

    0 讨论(0)
提交回复
热议问题