The thing is you did NOT specify a username and password for the registry access.
You tried using the ManagementScope class, which only works with WMI, not the Registry classes.
Also, if your code is running on a 32-bit machine, you're going to have problems with accessing a 64-bit registry.
So, don't use the Registry to do this. Use WMI instead. There are two ways to do this in WMI. You can either use the Standard Registry Provider in WMI or you can query the
Win32_OperatingSystem[
^] class to get the information you're looking for.
The Win32_OperatingSystem query method is better than the registry method as you won't run into issues with accessing a 64-bit registry from a 32-bit machine.