Answer the question
In order to leave comments, you need to log in
C#. Is it possible to apply registry values without reboot?
Hello.
Through the program I change the value in the registry. The value changes.
But how to programmatically apply the modified registry values? For them to take effect
Is this possible?
Thanks in advance
PS I'm trying to change the screen scale through the registry
RegistryKey currentUserKey = Registry.CurrentUser.OpenSubKey("Control Panel", true).OpenSubKey("Desktop", true).OpenSubKey("PerMonitorSettings", true);
string[] str = currentUserKey.GetSubKeyNames();
RegistryKey moni = Registry.CurrentUser.OpenSubKey("Control Panel", true).OpenSubKey("Desktop", true).OpenSubKey("PerMonitorSettings", true).OpenSubKey(str[0], true);
moni.SetValue("DpiValue", dpi);
Answer the question
In order to leave comments, you need to log in
Restart the service or program that reads this value. If the service is a system one, then reboot.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question