Answer the question
In order to leave comments, you need to log in
Why do registry changes only happen once?
There is a code:
RegistryKey myKey = Registry.CurrentUser;
RegistryKey wKey = myKey.CreateSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings", true);
wKey.SetValue("ProxyServer", proxyhost + ":" + port.ToString());
wKey.SetValue("ProxyEnable", 1);
wKey.Close();
myKey.Close();
Answer the question
In order to leave comments, you need to log in
Try manually flushing:
RegistryKey wKey = ...
wKey.SetValue(...);
wKey.Flush();
wKey.Close();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question