Read Registry Values using Microsoft.Management.Infrastructure (CimSession)
问题 I am able to query WMI classes and registry values using System.Management and StdRegProv (for registry). I want to move over to using Microsoft.Management.Infrastructure instead of System.Management. So far With help from lot of articles on the net, I can do a CIMSession and get the WMI classes (e.g. Win32_OperatingSystem) etc. with code as below using Microsoft.Management.Infrastructure; ... string Namespace = @"root\cimv2"; string OSQuery = "SELECT * FROM Win32_OperatingSystem"; CimSession