I was trying the verb = "runas"
, but I still was getting UnauthorizedAccessException when trying to update registry value. Turned out it was due to not opening the subkey with writeable set to true.
Registry.OpenSubKey("KeyName", true);
Cannot write to Registry Key, getting UnauthorizedAccessException