Why this code is not working
RegistryKey baseKey = RegistryKey.OpenBaseKey(RegistryHive.CurrentUser, RegistryView.Registry64);
RegistryKey key = baseKey.OpenSubKey(REGISTY_NOTIFICATION_ROOT_PATH, true);
key.SetValue("NOC_GLOBAL_SETTING_ALLOW_TOASTS_ABOVE_LOCK", bytes, RegistryValueKind.DWord);
After this i am calling close to flush the changes.
key.Close();
Tried baseKey .Close();
also but no luck
Ideally it should update the notification setting but it is not. Is there any other way to update DWORD
value in c#
Just to make it clear
I am using AppServiceConnection to actually communicate with win32 app and my win32 app is actual updating the Registry. My question is above code is not updating the registry value, It's not throwing any error but not updating the value also.
Thank