Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在制作一个适用于多个用户的应用程序,并使用另一个用户编写的注册表中的数据。 目前我正在写信给 HKCU。它不起作用,因为 HKCU 是本地的。失败后我尝试在本地机器上写,但它有一些权限问题。 那么在这种情况下写注册表的合适位置是什么。 我正在使用以下代码来创建密钥。 RegistryKey regKey = Registry.CurrentUser; RegistryKey subKey = regKey.CreateSubKey(subKeyName);
RegistryKey regKey = Registry.CurrentUser;
RegistryKey subKey = regKey.CreateSubKey(subKeyName);
我阅读了很多关于窗口注册表的内容,并开始知道这HKEY_CURRENT_CONFIG将 适合我的情况,因为它是所有用户的共同位置。此注册表位置的唯一问题是您需要管理员权限才能修改密钥。 RegistryKey regKey = Registry.CurrentConfig; RegistryKey subKey = regKey.CreateSubKey(subKeyName);
HKEY_CURRENT_CONFIG
RegistryKey regKey = Registry.CurrentConfig;