registry-virtualization

Accessing 64 bit registry from 32 bit application

眉间皱痕 提交于 2019-12-18 14:15:10
问题 I need to open a registry entry "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{26A24AE4-039D-4CA4-87B4-2F86416024FF}" in c++. It contains the java 64 bit application. The full path of that registry entry is "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{26A24AE4-039D-4CA4-87B4-2F86416024FF}" . We can view this path through regedit. I use returnStatus = RegOpenKeyEx(HKEY_LOCAL_MACHINE, TEXT("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\

Why is registry written in different location than expected?

陌路散爱 提交于 2019-12-18 04:44:12
问题 I tried to write a registry subkey and its corresponding value to registry like this: const string subKey = @"SOFTWARE\Apple\Banana\"; const string regKey = "pip"; var rk = Registry.LocalMachine.OpenSubKey(subKey); if (rk == null) rk = Registry.LocalMachine.CreateSubKey(subKey); var rv = rk.GetValue(regKey); if (rv == null) rk.SetValue(regKey, "XXX"); return rv.ToString(); Now the problem is that I when I look in the location manually (via regedit) I cannot see the folder SOFTWARE\Apple