c#读取注册表指定路径指定属性的值
程序员文章站
2022-06-12 17:07:54
...
注册表指定路径指定属性的值
RegistryKey hklm = Registry.LocalMachine;
RegistryKey software = hklm.OpenSubKey(@"SYSTEM\CurrentControlSet\Enum\USB\VID_2695&PID_7381\0001");
//打开"SYSTEM"子键
label1.Text = software.GetValue("LocationInformation") as string;
注:LocalMachine含义为注册表中第一层目录.
上一篇: C# 操作注册表
下一篇: torch.nn modules