wmic error (invalid XSL format) in windows7

前端 未结 3 1306
难免孤独
难免孤独 2020-12-01 13:49
wmic process get /format:csv

What is wrong with this command in Windows 7?

I get:

Invalid XSL format (or) file name.

3条回答
  •  情话喂你
    2020-12-01 14:24

    This is a bug in Windows 7 and Windows Server 2008 (also R2) WMIC. When you use (for example) Dutch regional settings in an English Windows installation, WMIC searches for the xsl files inside C:\Windows\System32\wbem\nl-NL, instead of C:\Windows\System32\wbem\en-US where they are.

    Workarounds:

    1. Copy or move the C:\Windows\system32\wbem\en-US\*.xsl files up into the C:\Windows\system32\wbem\ folder.
    2. Change your regional settings to match your Windows language version, log out and back in.
    3. Specify the full path: WMIC process get /format:"%WINDIR%\System32\wbem\en-US\csv".

提交回复
热议问题