I wrote a fixlet to upgrade Office XP to version 2003. Works okay. I am having some issues with the relevance though. I can determine what version is running but i cannot get the syntax correct to determine if a system has Office XP or Office 2000 and then make the relevance false when i install 2003.
You can detect Office installs in many ways… such as searching through the add/remove programs portion of the registry, finding the Office version info in the registry, or by looking at the applications included in Office.
Since Excel.exe and Winword.exe are in pretty much every version of Office, you can try looking at the version numbers of those applications (I believe it is version 9 for Office 2000, version 10 for Office XP, and version 11 for Office 2003):
Detect Office 2000 is installed:
((exists regapp “excel.exe” AND exists regapp “winword.exe”) AND (version of regapp “excel.exe” = “9” AND version of regapp “winword.exe” = “9”))
Detect Office XP is installed:
((exists regapp “excel.exe” AND exists regapp “winword.exe”) AND (version of regapp “excel.exe” = “10” AND version of regapp “winword.exe” = “10”))
Detect Office 2003 is installed:
((exists regapp “excel.exe” AND exists regapp “winword.exe”) AND (version of regapp “excel.exe” = “11” AND version of regapp “winword.exe” = “11”))
You can look for versions below your target version to get the relevance you want… such as if you want to upgrade from Office 2000/XP to Office 2003, your relevance would be:
(exists regapp “excel.exe” AND exists regapp “winword.exe”) AND (version of regapp “excel.exe” <= “11” AND version of regapp “winword.exe” <= “11”)
Note that I haven’t tested these and I am not 100% sure that they take into account every case (for instance, what if someone installed the standalone Excel and Word?), but they are pretty straightforward relevance clauses that I expect to work.