I am using below code and for SOFTWARE\\Intel\\Bluetooth\\Metrics
and Version
I'm NOT getting data. What's the reason?
ConnectionOptions oConn = new ConnectionOptions();
ManagementScope scope = new ManagementScope("\\\\.\\root\\default", oConn);
scope.Connect();
ManagementClass registry = new ManagementClass(scope, new ManagementPath("StdRegProv"), null);
ManagementBaseObject inParams = registry.GetMethodParameters("GetStringValue");
inParams["sSubKeyName"] = "SOFTWARE\\Intel\\Bluetooth\\Metrics";
inParams["hDefKey"] = 0x80000002;
inParams["sValueName"] = "Version";
ManagementBaseObject outParams = registry.InvokeMethod("GetStringValue", inParams, null);
if (outParams.Properties["sValue"].Value != null)
{
Console.WriteLine( outParams.Properties["sValue"].Value.ToString());
}
Note - With above code for SOFTWARE\\ASIO\\Realtek ASIO
and Description
, I am getting data. Why certain registry path/key NOT works?
inParams["sSubKeyName"] = "SOFTWARE\\ASIO\\Realtek ASIO";
inParams["hDefKey"] = 0x80000002;
inParams["sValueName"] = "Description";
User contributions licensed under CC BY-SA 3.0