I have not seen any additional responses but I have gotten something
working on my own.

The below script is a mock up of what I have put together.  The intent
is that the installer will detect previous versions of the library and
keep those versions in the GAC while adding itself, but if no previous
versions were installed then only the current version should be added.  

The question remains, is there a better way to do this?  To make this
approach work each upgrade is a major upgrade, and I have to maintain an
archive of all release builds so that they can be include in every
version of the MSI.  Is there any easy way of modifying this so that the
behavior is the same from the user perspective but the MSI only contains
the current files?
 
This script is set up to build an installer for v1.0.  If you switch the
product tags and remove the comments around the other blocks then you
have the installer for v1.1.  

<!--
v1.0.0
-->
<?define FooVersion = "1.0.0" ?>
<Product Id="52a713a0-ec27-4044-9484-f24e3951cf89" Name="Foo"
Language="1033" Version="$(var.FooVersion)" Manufacturer="Acme"
UpgradeCode="9b52b4d8-9d37-4f2f-a7bd-dc381db78987">
        
<!--
v1.1.0
<?define FooVersion = "1.1.0" ?>
<Product Id="352C8291-4046-42bf-948D-764B43D43518" Name="Foo"
Language="1033" Version="$(var.FooVersion)" Manufacturer="Acme"
UpgradeCode="9b52b4d8-9d37-4f2f-a7bd-dc381db78987">
-->

        <Package InstallerVersion="200" Compressed="yes" />

        <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />

        <Upgrade Id="9b52b4d8-9d37-4f2f-a7bd-dc381db78987">
                <UpgradeVersion Minimum="0.0.1"
Maximum="$(var.FooVersion)" IncludeMaximum="no" IncludeMinimum="yes"
OnlyDetect="no" Property="UPGRADEINPROG"></UpgradeVersion>
        </Upgrade>

        <InstallExecuteSequence>
                <RemoveExistingProducts After="InstallFinalize"/>
        </InstallExecuteSequence>

        <Property Id="DIRFOO">
                <RegistrySearch Id="FooPath" Type="directory"
Root="HKLM"
Key="SOFTWARE\Microsoft\.NETFramework\AssemblyFolders\Foo"></RegistrySea
rch>
        </Property>

        <Property Id="FOO100">
                <RegistrySearch Id="Foo100" Name="1.0.0" Root="HKLM"
Key="Software\DMH\Acme\Foo" Type="raw"></RegistrySearch>
        </Property>

<!--
        <Property Id="FOO110">
                <RegistrySearch Id="Foo110" Name="1.1.0" Root="HKLM"
Key="Software\DMH\Acme\Foo" Type="raw"></RegistrySearch>
        </Property>
-->
        
        <Directory Id="TARGETDIR" Name="SourceDir">
                <Directory Id="DIRFOO" Name="foo">
                        <Component Id="FooForVS"
Guid="C4F13748-9DA4-4e5d-8128-3AAC5EF25F7E">
                                <File Id="FooDLL"
Source="$(sys.CURRENTDIR)$(var.FooVersion)\Foo.dll"
KeyPath="yes"></File>
                                <File Id="FooPDB"
Source="$(sys.CURRENTDIR)$(var.FooVersion)\Foo.pdb"
CompanionFile="FooDLL"></File>
                                <File Id="FooXML"
Source="$(sys.CURRENTDIR)$(var.FooVersion)\Foo.xml"
CompanionFile="FooDLL"></File>
                                <RegistryKey Root="HKLM"
Key="SOFTWARE\Microsoft\.NETFramework\AssemblyFolders\Acme Foo"
Action="createAndRemoveOnUninstall">
                                        <RegistryValue Type="string"
Value="[DIRFOO]"></RegistryValue>
                                </RegistryKey>
                        </Component>
                        <Directory Id="F1.0.0" Name="1.0.0">
                                <Component Id="Foo100"
Guid="D1184D7C-6755-4d0d-8846-BDD9D909941A">
                                        <File Id="Foo 100"
Source="$(sys.CURRENTDIR)1.0.0\Foo.dll" KeyPath="yes"
Assembly=".net"></File>
                                        <RegistryKey Root="HKLM"
Key="Software\DMH\Acme\Foo" Action="createAndRemoveOnUninstall">
                                                <RegistryValue
Name="1.0.0" Type="string"
Value="D1184D7C-6755-4d0d-8846-BDD9D909941A"></RegistryValue>
                                        </RegistryKey>
                                </Component>
                        </Directory>
<!--
                        <Directory Id="F1.1.0" Name="1.1.0">
                                <Component Id="Foo110"
Guid="667F084E-D396-48b9-BBF1-6F630B9347C3">
                                        <File Id="Foo 110"
Source="$(sys.CURRENTDIR)1.1.0\Foo.dll" KeyPath="yes"
Assembly=".net"></File>
                                        <RegistryKey Root="HKLM"
Key="Software\DMH\Acme\Foo" Action="createAndRemoveOnUninstall">
                                                <RegistryValue
Name="1.1.0" Type="string"
Value="667F084E-D396-48b9-BBF1-6F630B9347C3"></RegistryValue>
                                        </RegistryKey>
                                </Component>
                        </Directory>
-->
                </Directory>
        </Directory>

        <Feature Id="Foo" Level="1">
                <Feature Id="FooVS" Level="1">
                        <ComponentRef Id="FooForVS"/>
                </Feature>
                <Feature Id="FooGlobal" Level="1">
                        <Feature Id="FooGAC100" Level="1">
                                <ComponentRef Id="Foo100"/>
                                <?if $(var.FooVersion) != "1.0.0"?>
                                <Condition Level="0">NOT
FOO100</Condition>
                                <?endif?>
                        </Feature>
<!--
                        <Feature Id="FooGAC110" Level="1">
                                <ComponentRef Id="Foo110"/>
                                <?if $(var.FooVersion) != "1.1.0"?>
                                <Condition Level="0">NOT
FOO110</Condition>
                                <?endif?>
                        </Feature>
-->
                </Feature>
        </Feature>
</Product>

Mike 

-----Original Message-----
From: Stout, Mike [mailto:mike.st...@oa.mo.gov] 
Sent: Friday, September 25, 2009 8:31 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Update adding a new compontent

My preference would be to have the new MSI only include the new files,
however we could include older versions if necessary. Ideally the
versions in the GAC would stack up until someone uninstalls them.  If we
could pull it off I would like to have one entry in add remove programs
that gives the option of removing a specific version or completely
removing all of the installed versions.

Correct.  File names and paths for VS support stay the same.

Preference would be to release a single MSI that can be run from
windows.

Mike 

-----Original Message-----
From: Blair [mailto:os...@live.com] 
Sent: Thursday, September 24, 2009 5:27 PM
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] Update adding a new compontent

I assume from the description you don't want to ship the older versions
you
intend to leave behind in newer MSIs, correct? Will those old components
ever be removed? If so, by what mechanism?

The component you update (that is the DLL, Debug, Doc, and Registry,
correct?) keeps its filename and directory, correct?

Are you intending to simply ship the raw MSI file out, or are you
bootstrapping it?

-----Original Message-----
From: Stout, Mike [mailto:mike.st...@oa.mo.gov] 
Sent: Thursday, September 24, 2009 1:06 PM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Update adding a new compontent

I am new to writing set up packages in general and I am looking for a
way to have a single file installer that will work as both a clean
install and an update to previous installs.  The catch is that in update
mode I need to change an existing component, add a new component, and
leave a third in place.

 

Example:  We have an installer for a framework library.  One component
drops a copy of the DLL into the GAC.  Another component writes the DLL,
Debug and Documentation files to an install directory and adds a
registry entry telling Visual Studio where to find them.  Now when it is
time to update we want to add the new version to the GAC (new component)
without removing the original version(leave existing component), but
overwrite the files VS uses with the new version (update existing
component).

 

The approach seems to have gotten me closest is to change the ID of the
GAC component with each revision while leaving the ID of the VS
component static. However to get this to work I am also having to change
the product ID which results in each update having its own entry in
add/remove programs.

 

Am I on the right track with this?  Is there a simple way to get this
type of behavior without having to change the product ID?

 

Mike

 

 

------------------------------------------------------------------------
----
--
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and
stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register
now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------
------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and
stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register
now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------
------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and
stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register
now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to