I am trying to extract an excel version from the registry, but I am having problems using
Registry.GetValue(...) Method
The value I'm trying to retrieve is in HKEY_CLASS_ROOT \ Excel.Application \ CurVer But I donโt know which name should be specified as a parameter in the GetValue method.
I tried:
RegistryKey key = Registry.ClassesRoot; RegistryKey subKey = key.OpenSubKey(@"Excel.Application\CurVer"); // Also tried w/o the "\CurVer" return subKey.GetValue("CurVer");
But I keep getting NullReferenceException in GetValue
source share