Im trying to create a key and writing a dword value to it. My code results in access denied. My windows user has permission as i can manually add/edit the key.
RegistryKey Key = Registry.LocalMachine.CreateSubKey(@"SOFTWARE\ExistingKey\NewKey");
Key.SetValue("CurrentSlipNumber", CurrentSlipNumber, RegistryValueKind.DWord);
All the solutions i see involve modifying UAC or running my program as administrator. These are not available options.
How can i allow this to modify the registry with only code changes?