WMI Query on a non english system

419 Views Asked by At

i have to query the WMI-Api on a german and an english computer. But on the different systems, there are different results.

For example:

I have to query "Msvm_ComputerSystem". There is a property named "Caption". On the english computer the result is "Virtual Machine" an on a german computer the result is "Virtueller Computer".

How can i force the language to en-us?

1

There are 1 best solutions below

0
On

Don't know if it will work, but it is worth trying. Before executing the query, change the culture of the current thread to CultureInfo.Invariant:

Thread.CurrentThread.CurrentCulture = CultureInfo.Invariant;