views:

255

answers:

4

Hello,

Any one knows how can I make an Installer Common for the both office 2003 / 2007 plugin. Installer should automatically select the appropriate Office Version (2003/2007), depends on which Office is installed.

I'm using VS2008, Extensibility - Shared Addin, for my Office Plugin. I have 2 Projects for 2003 and 2007, I want to make a Common Installer for both.

is anybody has done similar thing prior ?

I need a deployment (msi) package such that user doesn't need to choose which version he needs to use.

+1  A: 

Ive used this bat file command in the past to install the correct PIAs perhaps you can find it useful, if there is "HKLM\SOFTWARE\Microsoft\office\12.0\Excel" means that Office 2007 Excel is installed ect...

@Echo off
:BEGIN
CLS
reg query "HKLM\SOFTWARE\Microsoft\office\12.0\Excel" || GOTO INSTALL11
REM ***************  INSTALLING OFFICE 12 PIA *****************************
%programfiles%\{InstallFolder}\O2007PIA.msi /passive

exit
:INSTALL11
reg query "HKLM\SOFTWARE\Microsoft\office\11.0\Excel" || GOTO INSTALLNOTHING
REM ***************  INSTALLING OFFICE 11 PIA *****************************
%programfiles%\{InstallFolder}\O2003PIA.msi /passive
exit
:INSTALLNOTHING
REM ... Clean up left out for brevity

perhaps you could write a msi script that does the same.

almog.ori
A: 

The link below explains how to tell if Office XP is installed. I'm sure a similar page exists for all other recent versions of Microsoft Office. You can even filter by specific versions of Office XP.

http://office.microsoft.com/en-us/orkXP/HA011364611033.aspx

Steven
A: 

I used the "target the lowest common demoninator" strategy as explained here. It worked well for me.

Nelson
A: 

That is quite easy.

within you msi you only need to search for the key paths of the office installations. this key paths are documented by microsoft.

Office 2003 Keypath and Default Installation Settings workbooks

there are also documents for other office version.

maybe you can also use the find related products feature from installer in detect mode. MSI Upgrade Table

after detecting the versions you need only an expression on the components/feature

Bernd Ott
I don't think this will help me out.
Tumbleweed
what is the main problem? do you have problems using the windows installer or do you do not have the "right" tools for creating the msi? i'm using wix (http://wix.sf.net) with the eclipse ide (or c# develop).
Bernd Ott
I came across this link http://blogs.msdn.com/vsto/archive/2009/05/20/deploying-multiple-office-solutions-in-a-single-installer.aspx
Tumbleweed
ah, i see. they are talking about click once. this is a complete different technology than msi. msi is the database of windows installer. you can start reading here: http://msdn.microsoft.com/en-us/library/cc185688%28VS.85%29.aspxa good tutor to my favorite tool: http://www.tramontana.co.hu/wix/but thats a bit outdated - it talks about version 2!
Bernd Ott