FINALLY! And naturally it didn't end up being very complicated. :p

So here is what i did.


   1. In my .wxs I made an upgrade element to upgrade the product like you
   normally would EXCEPT I made the upgrade code a random guid (NOT one i am
   using). This was the only way I could get wix to create the upgrade table in
   the msi. Since the guid is bogus it will never be found and the installs
   will continue on as they normally would.
   2. I used the 'CustomAction' element to give each instance is own upgrade
   code and set the 'UpgradeCode' property according to the instance chosen.
   Note: I scheduled these to run before 'AppSearch'.
   3. Then I made a C# custom action to add temporary rows to the Upgrade
   table.
   4. The added rows were a copy of the current rows that were put there by
   the 'Upgrade' element. EXCEPT I changed the 'UpgradeCode' to be the same as
   the 'UpgradeCode' in the Property table.
   5. This custom action is scheduled to run after the last 'SetUpgradeCode'
   custom action that was mentioned in step 2.
   6. THAT"S IT!


On Thu, Apr 14, 2011 at 12:57 PM, Tyler Walters
<tyler.walters...@gmail.com>wrote:

> RemoveExistingProducts is part of the MajorUpgrade element. The Schedule
> attribute is what schedules RemoveExistingProducts.
>
> Thanks for the advice though.
>
> I am thinking I may have to do a custom action that modifies the
> UpgradeTable at install time, if that is even possible.
>
>
> On Thu, Apr 14, 2011 at 11:35 AM, Tyler Walters <
> tyler.walters...@gmail.com> wrote:
>
>> Currently I can do a major upgrade of a specific instance. There are a
>> couple problems though.
>>     1. The default instance is upgraded fine. The transforms are upgraded,
>> BUT the previous version is not removed. So they both show up in ARP.
>>     2. I need to be able to not downgrade a specific instance, but be able
>> to install an old version as a different instance.
>>
>> I am currently giving each instance it's own upgrade code and then
>> scheduling the FindRelatedProducts action after the upgrade codes are set.
>>
>>
>> Here is the current code:
>>
>> <Product Id="YOURGUID-7AF1-4854-9B4F-01A6C77CC4AB"
>>                      Name="InstanceTransforms"
>>                      Language="1033"
>>                      Version="8.1.0.0"
>>                      Manufacturer="DCT"
>>                      UpgradeCode="{YOURGUID-F8CA-4F91-B74D-DF92AE4AB8FF}">
>>
>>         ...
>>
>>         <MajorUpgrade AllowDowngrades="no" DowngradeErrorMessage="A new
>> version of [ProductName] is already installed. Exiting installation."
>> Schedule="afterInstallFinalize" />
>>
>>         <Property Id="INSTANCEID" Value="Default Instance" Secure="yes" />
>>         <InstanceTransforms Property="INSTANCEID">
>>             <Instance Id="Instance_1"
>> ProductCode="YOURGUID-975B-4CBA-B2CC-B363CAA4312C"
>> ProductName="InstanceTransforms"/>
>>             <Instance Id="Instance_2"
>> ProductCode="YOURGUID-CB52-485A-BE2A-1B2A407CD878"
>> ProductName="InstanceTransforms"/>
>>         </InstanceTransforms>
>>
>>         <CustomAction Id="SetUpgradeCode_1" Property="UpgradeCode"
>> Value="{YOURGUID-975B-4CBA-B2CC-B363CAA4312C}" />
>>         <CustomAction Id="SetUpgradeCode_2" Property="UpgradeCode"
>> Value="{YOURGUID-CB52-485A-BE2A-1B2A407CD878}" />
>>
>>         ...
>>
>>         <InstallUISequence>
>>             <Custom Action="SetUpgradeCode_1" Before="AppSearch"
>> >INSTANCEID = "Instance_1"</Custom>
>>             <Custom Action="SetUpgradeCode_2" Before="AppSearch"
>> >INSTANCEID = "Instance_2"</Custom>
>>             <FindRelatedProducts After ="SetUpgradeCode_2"/> <!--Do
>> FindRelatedProducts after the last upgradecode CA runs.-->
>>         </InstallUISequence>
>>         <InstallExecuteSequence>
>>             <Custom Action="SetUpgradeCode_1" Before="AppSearch"
>> >INSTANCEID = "Instance_1"</Custom>
>>             <Custom Action="SetUpgradeCode_2" Before="AppSearch"
>> >INSTANCEID = "Instance_2"</Custom>
>>             <FindRelatedProducts After="SetUpgradeCode_2"/>
>>         </InstallExecuteSequence>
>>         ...
>> </Product>
>>
>> --
>> Tyler Walters - Duck Creek Technologies
>>
>>
>
>
> --
> Tyler Walters
>
>


-- 
Tyler Walters
------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to