P
Piotrekk
Hi
I have accessed registry key where system path is stored:
RegistryKey myKey =
Registry.LocalMachine.OpenSubKey("System\\CurrentControlSet\\Control\\Session
Manager\\Environment");
Then i'am trying to change the value:
if (myKey != null)
{
object val = myKey.GetValue("Path");
RegistryValueKind rvk = myKey.GetValueKind("Path");
val = dir + ";" + val;
myKey.DeleteValue("Path");
myKey.SetValue("Path", val);
return;
}
OpenSubKey returns key read only. I dunno how to set access to this
regkey such that is would be possible to write to it.
How to change privilages to force program to write new val to the reg?
Thanks for any sugestions
Piotr Kolodziej
I have accessed registry key where system path is stored:
RegistryKey myKey =
Registry.LocalMachine.OpenSubKey("System\\CurrentControlSet\\Control\\Session
Manager\\Environment");
Then i'am trying to change the value:
if (myKey != null)
{
object val = myKey.GetValue("Path");
RegistryValueKind rvk = myKey.GetValueKind("Path");
val = dir + ";" + val;
myKey.DeleteValue("Path");
myKey.SetValue("Path", val);
return;
}
OpenSubKey returns key read only. I dunno how to set access to this
regkey such that is would be possible to write to it.
How to change privilages to force program to write new val to the reg?
Thanks for any sugestions
Piotr Kolodziej