Search code examples
windowswinapicomwmi

How to find corresponding WMI/COM object for any given Windows Registry key?


How to find corresponding WMI/COM object for any given Windows Registry key? Is there any useful table of this mapping on the web or function in the API?

(Saying "any" I mean any, for which such a mapping exists.)

Edit:

I'm asking because I have discovered that some WMI objects reflect their values to the Windows Registry keys.

For example there is mapping from

root\cimv2:Win32_OSRecoveryConfiguration.AutoReboot

to

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl\AutoReboot

Solution

  • For the WMI part you can read the MappingStrings qualifier of the WMI class or you can use a tool like the WMI Delphi code creator to get this info.

    enter image description here

    Also you can read this article How obtain the source of the WMI Data to see a delphi sample code.