I know that to detect the version of IE that is installed on a machine, you can check the version of shdocvw.dll. Is there a way to reliably determine if Office 2000 is installed?
Thanks.
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Office 2000
Started by
Ellen
, Mar 19 2002 17:54
2 replies to this topic
Posted 22 March 2002 - 17:38
You could check in the registry.....
string szKey, szPath;
number nvSize, nvType;
nRootKey = HKEY_LOCAL_MACHINE;
if (RegDBSetDefaultRoot (nRootKey) < 0) then
MessageBox ("Unable to obtain registry information!", INFORMATION);
else
szKey = "SOFTWARE\\Microsoft\\office\\9.0\\Common\\InstallRoot";
if (RegDBGetKeyValueEx (szKey, "Path", nvType, szOfficePath, nvSize) < 0) then
//Not Access 2000
szKey = "SOFTWARE\\Microsoft\\office\\8.0\\Common\\InstallRoot";
if (RegDBGetKeyValueEx (szKey, "OfficeBin", nvType, szOfficePath, nvSize) < 0) then
//Not Access 97
//Try XP = version 10.0 etc.
endif;
endif;
end if;
Don't know if that is the "Correct way" but it works! If the path isn't there then the Office version isn't installed. Some applications install runtime versions which might install the common registry settings, but you could also make the reg search more specific if you kow what you are looking for.
(e.g. Replace "Common" with "Access")
HTH
Grant
string szKey, szPath;
number nvSize, nvType;
nRootKey = HKEY_LOCAL_MACHINE;
if (RegDBSetDefaultRoot (nRootKey) < 0) then
MessageBox ("Unable to obtain registry information!", INFORMATION);
else
szKey = "SOFTWARE\\Microsoft\\office\\9.0\\Common\\InstallRoot";
if (RegDBGetKeyValueEx (szKey, "Path", nvType, szOfficePath, nvSize) < 0) then
//Not Access 2000
szKey = "SOFTWARE\\Microsoft\\office\\8.0\\Common\\InstallRoot";
if (RegDBGetKeyValueEx (szKey, "OfficeBin", nvType, szOfficePath, nvSize) < 0) then
//Not Access 97
//Try XP = version 10.0 etc.
endif;
endif;
end if;
Don't know if that is the "Correct way" but it works! If the path isn't there then the Office version isn't installed. Some applications install runtime versions which might install the common registry settings, but you could also make the reg search more specific if you kow what you are looking for.
(e.g. Replace "Common" with "Access")
HTH
Grant