So I used RegEdit to add the following to the registry on my workstation:
HKLM\Software\Foo\Bar
Bar has a k/v pair of "wtf"/"idk". I verified that these changes "took" by closing regedit and re-opening it. Hey, they're still there! Swell.
RegistryKey key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Foo\Bar");
if (key != null)
{
var = key.GetValue("wtf").ToString();
}
The problem is, key is null.
When. . .
Registry.LocalMachine.OpenSubKey("Software").GetSubKeyNames()
Is called, Foo doesn't show up amongst the however many SubKeyNames.
So, I am obviously missing something stupid. What specifically am I missing?