I have Application settings stored under HKEY_LOCAL_MACHINE\SOFTWARE\MyCompany branch. Settings must be same for different users and that is the reason why settings are not under HKEY_CURRENT_USER. Registry values are only read during use of application.
Now, in Windows Vista and due to UAC you can't anymore use following code to read registry values:
RegistryKey myKey = Registry.LocalMachine.CreateSubKey
("SOFTWARE\\MyCompany\\MyAppName");
How can I read the values from LocalMachine branch in my code (C#)?