Keep getting an error on this code:
I KNOW for certain that a key exists in this location, so the key not existing is out of the question.Code:RegistryKey rKey = Registry.LocalMachine; rKey.OpenSubKey(@"\SOFTWARE\Blizzard Entertainment\World of Warcraft", true); try { return rKey.GetValue("InstallPath").ToString(); } catch (NullReferenceException) { return null; }
Unsure what the issue could be.
ETA: Obviously the error no longer appears due to the catch, but that should have been obvious.




Reply With Quote