I am trying to overwrite the below values in registry on existing value of "Default". Written the below code but it is not updating the value. also code is not giving any error.
[HKEY_CLASSES_ROOT\ugmportalfile\Shell\Open\Command] @="\"%TPR%\start_manager.bat\""
RegistryKey regKey=Registry.ClassesRoot.OpenSubKey("ugmportalfile\\Shell\\Open\\Command", true);
//Microsoft.Win32.RegistryKey regKey;
regKey = Microsoft.Win32.Registry.ClassesRoot;
regKey.OpenSubKey(@"ugmportalfile\Shell\Open\Command");
regKey.SetValue("Default", @"%TPR%\start_manager.bat");
regKey.Close();