We've done something similar for MS Office versions so I can give you an
outline. We have a single installer that installs some files to a Word
directory.

1. Create a set of file and/or registry searches detect the location of each
Visual Studio and store them in appropriately named properties, e.g.
VS2005DIR, VS2008DIR, VS2010DIR.

2. Define the installation directory and contents. Omit the Name attribute.
<Directory Id="VSINSTALLDIR">
        <Component.... /Component>
</Directory>

3. Define custom actions that set the directory property from step 2,
representing where the installation will be, e.g.
<CustomAction Id="SetVS2005Dir" Directory="VSINSTALLDIR"
Value="[VS2005DIR]\Common7\IDE\Extensions" />
And so on for VS2008 and VS2010.

4. In the Installation sequences, schedule these actions, in order, from
lowest version to highest so that the higher versions overwrite the earlier,
e.g.
<Custom Action="SetVS2005Dir" After="CostFinalize">not Installed and
VS2005DIR</Custom>
<Custom Action="SetVS2008Dir" After="SetVS2005Dir ">not Installed and
VS2008DIR</Custom>
Etc

I'm not sure what you meant about uninstallation but I hope the above is
enough to help you solve it.

-----Original Message-----
From: Kyle McClellan [mailto:kyl...@microsoft.com] 
Sent: 07 June 2011 19:40
To: WiX-users@lists.sourceforge.net
Subject: [WiX-users] What is the best design to support a conditional
rootdirectory

I'm in the process of updating our product to support multiple versions of
Visual Studio. I'd like a recommendation as to what would be the best way to
correctly implement this while avoiding as much duplication as possible.

We want to drop the same set of files under the latest Visual Studio
installation. For example, if VS2010 exists then we want to place most of our
files under "C:\Program Files (x86)\Microsoft Visual Studio
10.0\Common7\IDE\Extensions". With this update, we'd like them under "<Latest
VS>\Common7\IDE\Extensions". At the same time, we want to be able to
uninstall without having to determine the latest version.

Any thoughts on how best to structure our .wxs file(s)? Thanks.




-----------------------------------------------------------------------------
-
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
SDL PLC confidential, all rights reserved.
If you are not the intended recipient of this mail SDL requests and requires 
that you delete it without acting upon or copying any of its contents, and we 
further request that you advise us.
SDL PLC is a public limited company registered in England and Wales.  
Registered number: 02675207.
Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, 
UK.


------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to