If you use a 64-bit OS, some registry keys are redirected to WOW64. Additional information on this topic is available on MSDN , you should look under Wow6432Node, and you will find your entry. If you execute this code the first time it is created on a 64-bit machine (I tried it locally), this entry:
HKEY_LOCAL_MACHINE \ Software \ Wow6432Node \ Microsoft \ Office \ Outlook \ FormRegions \ tesssst
if you want to access your 64-bit registry section, which you should do:
public void ConfigureWindowsRegistry() { RegistryKey localMachine = RegistryKey.OpenBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, RegistryView.Registry64); //here you specify where exactly you want your entry var reg = localMachine.OpenSubKey("Software\\Microsoft\\Office\\Outlook\\FormRegions\\tesssst",true); if (reg == null) { reg = localMachine.CreateSubKey("Software\\Microsoft\\Office\\Outlook\\FormRegions\\tesssst"); } if (reg.GetValue("someKey") == null) { reg.SetValue("someKey", "someValue"); } }
Executing the above code will put the registry key in the correct section that you are targeting.
hope this helps.
source share