Question

I want get updates from a server for certain apps and I need to know their GUID. I started from a piece of code I found here, but I can't figure out how to get the GUID in

tstring WmiQueryValue(IWbemClassObject* pclsObj, LPCWSTR szName)

for pclsObj. I tried passing both "GUID" and "Guid" in szName, but I don't get anything.

Is there anyway to get the GUID this way?

Was it helpful?

Solution

pclsObj is a Win32_Product, you find that out with szName "__CLASS" for WMIQueryValue. I looked it up and this class has IdentifyingNumber as member, which stores the GUID :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top