I'm trying to retrieve the version of excel from the registry but I have problems using the
Registry.GetValue(...)
method
The value I am trying to retrieve is in HKEY_CLASS_ROOT\Excel.Application\CurVer But I do not know what name to put 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 a NullReferenceException on the GetValue