更新时间:2023-09-24 23:17:22
您可以检查该键的值(如Access.Application.12)代替。 HKEY_LOCAL_MACHINE \ SOFTWARE \ Classes下\ Access.Application \ CURVER
You can check this key for a value (eg. Access.Application.12) instead. HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Access.Application\CurVer
所以,你的code线将是:
So your line of code would be:
RegistryKey rootKey = Registry.ClassesRoot.OpenSubKey(@"Access.Application\CurVer", false);
if (rootKey == null) return false;
string value = rootKey.GetValue("").ToString();
int verNum = int.Parse(value.subString(value.indexOf("Access.Application.")));
if (value.StartsWith("Access.Application.") && verNum >= 12)
{ return true; }