Message404451
All that said, if we're going to shell out to "ver", we may as well try "wmic os get Caption,Version /value" first and parse its output. For me, it looks like the below (with a number of blank lines around it):
Caption=Microsoft Windows 10 Enterprise
Version=10.0.19043
I would assume the output is in MBCS, and there doesn't appear to be an option to change that - the "/locale" option appears to influence translations, rather than encoding.
We'd still want the "ver" fallback I think. The wmic command is deprecated in favour of PowerShell commands, which means we would have to implement native calls to get equivalent functionality. But I expect neither cmd.exe nor wmic.exe will actually disappear for a long time. |
|
Date |
User |
Action |
Args |
2021-10-20 13:45:41 | steve.dower | set | recipients:
+ steve.dower, lemburg, paul.moore, vstinner, tim.golden, zach.ware, eryksun, sahsariga111 |
2021-10-20 13:45:41 | steve.dower | set | messageid: <1634737541.34.0.768093927508.issue45382@roundup.psfhosted.org> |
2021-10-20 13:45:41 | steve.dower | link | issue45382 messages |
2021-10-20 13:45:41 | steve.dower | create | |
|