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 :)
(How) Can I get GUID from an IWbemClassObject object?
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?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow