Friday, July 8, 2011

wmic “Invalid XSL format (or) file name.”

So on my windows 7 box trying to:
wmic product get /format:csv
produces a output:
Invalid XSL format (or) file name.

Located teh csv.xsl file in C:\windows\system32\wbem\en-US
Guessed that it was unable to locate the xsl format file...
so copied it to the local path and it worked !
Confirmed this with Process monitor :-(

It seems to be looking for the correct locale so I added a C:\windows\system32\wbem\en-US to C:\windows\system32\wbem\en-AU

since we all don't live in the US of A... :-|

Alternative options are:
I just copied to C:\windows\system32\wbem\en-US\*.xls to C:\windows\system32

1 comment:

Oliver K said...

(You have a typo copying xls in the last line, should be *.xsl)

Anyway, copying to system32 did not work.
Ended up using /format:"%WINDIR%\System32\webm\en-US\csv"