joshpc99
Posts: 1
Joined: Fri Sep 02, 2011 8:22 pm

Variable Install Path Based on Office Version

I'm a first time AI user and have been able to successfully create an msi that works for me on my computer. I'm trying to now get it to work with other people that I work with who have different versions of Office. I have 2007, some have 2010. The install paths are nearly identical minus Office12 vs Office 14. I can't figure out how to install to the highest version of Office on their computer. I created search paramaters to get the paths for each version of office but I how do I test which one they have and install to that path?

Any help would be appreciated.

Thanks!
Joshua
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Variable Install Path Based on Office Version

Hi Joshua,

The searches already determine what Office versions they have. All you need to do is set the installation path based on their results. The general approach is this:
- use our predefined Office searches to create a search for each Office version you want to support (in your case one for 2007 and another one for 2010)
- the search names are actually installer properties which will contain the search result
- in Custom Actions page show "AppSearch" standard action in InstallUISequence
- add a Property set with formatted custom action under it
- configure it to set APPDIR (the property associated with Application Folder) to the Office 2010 search property, for example:

Code: Select all

[OFFICE_2010_PATH]
- condition this action with the search property, for example:

Code: Select all

OFFICE_2010_PATH
- create a similar action for Office 2007
- condition that action to run only when Office 2010 is not found, but Office 2007 is detected; for example:

Code: Select all

(NOT OFFICE_2010_PATH) AND OFFICE_2007_PATH
This way Application Folder path is set to Office 2010 if it's found or to Office 2007 if Office 2010 is not detected.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”