我基于类型的Windows操作系统中安装一个企业软件。但我无法读取的Windows 10物联网核心操作系统的任何特定的注册表项,能否请您在此帮助
它似乎访问在Windows物联网核心注册表程序无法做到的。无论是通过UWP或Win32的。
相关专题:“How to read registry in windows 10 universal app.”
下面的代码工作在桌面上,反而会导致异常的Windows物联网的核心:
try
{
using (RegistryKey key = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"))
{
if (key != null)
{
Object o = key.GetValue("BuildNumber");
if (o != null)
{
Console.WriteLine("Current Build version: " + o.ToString());
}
else
{
Console.WriteLine("key.GetValue return NULL!");
}
}
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
试图通过方法 'ReadRegistry.Program.Main(System.String [])' 来访问字段 'Microsoft.Win32.Registry.CurrentUser' 失败。
关于这个问题,你可以通过反馈中心提交的反馈。
解决方法是使用命令行像powershell: