[wix-users] WiX Bundle upgrade or install new to run side by side

Hoover, Jacob Jacob.Hoover at greenheck.com
Thu Feb 9 08:10:59 PST 2017


But in order to support side by side installs, we have suggested (and I believe you went with) changing the install folder and the upgrade code.  As such, the only time you have to worry about the upgrade scenario is when you are servicing within a side by side install.  IE, 1.0.0 to 1.0.1.  When you are doing a 1.0 to 1.1 via your custom BA, the only process that will happen is installing 1.1 first, and then you conditionally invoking the 1.0 BA if they chose to remove it. 

Again I want to ask, where does this config file come from?  Is it installed or does the application create it on first run? 

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Harinatha Narisetty
Sent: Thursday, February 09, 2017 9:24 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] WiX Bundle upgrade or install new to run side by side

 Please see below custom actions sequence...

 1. User has 1.0 installed
 2. We shipped  2.0, during installation user selected Upgrade.
         O Side By Side
         O Upgrade

 I want to backup config files from 1.0 to somewhere on appdata folder  and after 2.0 installed, copy the files back to 2.0 folder.


<InstallExecuteSequence>
      <Custom Action="BackupConfigFilesAction"  Before="RemoveExistingProducts"> <![CDATA[(Upgrading OR RemovingForUpgrade)]]></Custom>
      <RemoveExistingProducts After="InstallInitialize"/> 
      <Custom Action="RestoreConfigFilesAction" After="RemoveExistingProducts"> <![CDATA[(Upgrading) AND NOT RemovingForUpgrade]]></Custom>  </InstallExecuteSequence>

Is it the right  sequence of Custom Actions?


Thanks
Hari


-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Edwin Castro
Sent: Wednesday, February 08, 2017 9:59 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] WiX Bundle upgrade or install new to run side by side

The relative scheduling you have doesn't seem wrong on the surface.
You'll want to use conditions to determine if they should be run or not.

Remember that RemoveExistingProducts does not run on uninstall. It runs during an upgrade to cause the current version to get uninstalled.

I can't tell exactly what you're trying to do based on your last sentence. It sounds like you want

Install: RestoreConfigFiles
Uninstall: BackupConfigFiles
Upgrade BackupConfigFiles, RemoveExistingProducts, RestoreConfigFiles

You might consider checking out
http://code.dblock.org/2010/05/11/msi-property-patterns-upgrading-firstinstall-and-maintenance.html

Those properties might be helpful in constructing the conditions you need.

Remember that if version 1.0 already has all three custom actions, then you'll want to ensure they do not run when you are RemovingForUpgrade. If version 1.0 doesn't have the custom actions, then you will likely still need to take this into consideration for when you are upgrading from 2.0 to 3.0 (in the future) since the conditions have to be correct now to work later.

Perhaps something like this might work:

<Custom Action="BackupConfigFiles"
Before="RemoveExistingProducts"><![CDATA[(Uninstalling OR Upgrading) AND NOT RemovingForUpgrade]></Custom> <RemoveExistingProducts After="InstallInitialize"/> <Custom Action="RestoreConfigFiles"
After="RemoveExistingProducts"><![CDATA[(FirstInstall OR Upgrading) AND NOT RemovingForUpgrade]></Custom>

Note that if you use the <MajorUpgrade/> element then you may need to use different properties instead of OLDERVERSION_BEINGUPGRADED and NEWERVERSION_INSTALLED. Check the comments as they offer suggestions.

--
Edwin G. Castro

On Wed, Feb 8, 2017 at 11:41 AM, Harinatha Narisetty <harinatha.narisetty at us.abb.com> wrote:
> Hi,
> Please below custom actions sequence...
>
> 1. User has 1.0 installed
> 2. We shipped  2.0, during installation user selected Upgrade.
>         O Side By Side
>         O Upgrade
>
> I want to backup config files from 1.0 to somewhere on appdata folder  and after 2.0 installed, copy the files back to 2.0 folder.
>
> <Custom Action="BackupConfigFiles" After="InstallInitialize" /> 
> <RemoveExistingProducts After="BackupConfigFiles" /> <Custom 
> Action="RestoreConfigFiles" After="RemoveExistingProducts " />
>
> I don't want to run  the last one  while uninstalling ...Last action should run only on install  and first 2 should run only on uninstall. How do I sequence them correctly?
>
>
> Thanks
> Hari
>
>
> -----Original Message-----
> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On 
> Behalf Of Justin Cox
> Sent: Tuesday, February 07, 2017 5:10 PM
> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
> Subject: Re: [wix-users] WiX Bundle upgrade or install new to run side 
> by side
>
> I do something similar with a web application installer.  It installs three separate web apps, and if it detects that it's overwriting or upgrading an existing application, or installing a new one.
>
> The problem is with RemoveExistingProducts.  If I install WebApplication200, then later install WebApplication201 as side-by-side, it will uninstall WebApplication200 in the process during "RemoveExistingProducts". If you disable RemoveExistingProducts, then the installer will not overwrite any files if you try to install over top of WebApplication200.
>
> My solution was a custom action that checked to see if a web application of the same name existing, rename the folder to WebApplication200_BAK, install the new one, then copy back and preserved files.  Easy to implement, but much harder to configure the uninstall and rollbacks.
>
> On Tue, Feb 7, 2017 at 2:03 PM Harinatha Narisetty < harinatha.narisetty at us.abb.com> wrote:
>
>> Ok. Let me try...
>>
>> -----Original Message-----
>> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On 
>> Behalf Of Hoover, Jacob
>> Sent: Tuesday, February 07, 2017 5:01 PM
>> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
>> Subject: Re: [wix-users] WiX Bundle upgrade or install new to run 
>> side by side
>>
>> You could use one of the predefined RegSearch/FileSearch elements, or 
>> you could use MsiGetProductInfo, or you could do something custom.  A 
>> common pattern is to store a value in a location in the registry for your app.
>> Ex: HKLM\Software\Mfg\AppName\Version\@InstallLocation
>>
>> The reason I suggest passing it in is because it's the bundle 
>> deciding which version it would be copying it from, right?  In theory 
>> you could have a 1.0 and 1.1 installed side by side, and the user 
>> opts to install 2.0 side by side, but wants to copy the config from say.. 1.0.
>> You'd either pass in the full path, or at a minimum you'd pass in the 
>> version and the MSI could then have a property, populated by a 
>> RegSearch, that would use that passed in version.
>>
>> -----Original Message-----
>> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On 
>> Behalf Of Harinatha Narisetty
>> Sent: Tuesday, February 07, 2017 3:37 PM
>> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
>> Subject: Re: [wix-users] WiX Bundle upgrade or install new to run 
>> side by side
>>
>> From this " Your new bundle will install the new MSI in a new location.
>> Since your bundle is detecting the previous install, (and because you 
>> also have a custom BA), its probably easiest to do your location 
>> logic within the BA to find the full path of the existing config file."
>>
>> How do I find out full path of the previous install location in 
>> custom BA?  Also should I pass the filelocation to MSI?
>>
>>
>> Thanks
>> Hari
>>
>>
>>
>> -----Original Message-----
>> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On 
>> Behalf Of Hoover, Jacob
>> Sent: Tuesday, February 07, 2017 3:55 PM
>> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
>> Subject: Re: [wix-users] WiX Bundle upgrade or install new to run 
>> side by side
>>
>> Your new bundle will install the new MSI in a new location.  Since 
>> your bundle is detecting the previous install, (and because you also 
>> have a custom BA), its probably easiest to do your location logic 
>> within the BA to find the full path of the existing config file.
>>
>> Then you want to add something along the lines of:
>> Bundle.wxs:
>>
>> <Variable Name="COPYCONFIG" Value="False" bal:Overridable="yes"  /> ...
>> (Inside your Main MSI area for the app) <MsiProperty Name=" COPYCONFIG "
>> Value="[ COPYCONFIG]"/>
>>
>> Product.wxs:
>> <Property Id=" COPYCONFIG " Secure="yes"/>
>>
>> And then pass said property to a SemiCustom CA that would insert a 
>> CopyFile record into the MSI DB at runtime.  (This assumes that your 
>> existing install doesn't lay down this file, and the user is 
>> creating/modifying it after the fact.)
>>
>> If there are just a few settings in the config that you want 
>> transferred or your installer is actually placing a new version of 
>> the config file, you could look at using some of the existing CA's to read and write XML.
>>
>>
>> -----Original Message-----
>> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On 
>> Behalf Of Harinatha Narisetty
>> Sent: Tuesday, February 07, 2017 12:49 PM
>> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
>> Subject: Re: [wix-users] WiX Bundle upgrade or install new to run 
>> side by side
>>
>> Hi All,
>> Everything is working to support side by side installation or upgrade 
>> to this version based on user selection.
>> For example:
>> 1. User installed  2017.1.0
>> 2. We released 2017.2.0, when user try to install this , he is 
>> prompted with below options
>>         O Install side by side
>>       O Upgrade 2017.1.0  to 2017.2.0 Everything works fine based on 
>> user selection.
>> When user selects Upgrade, it is removing the existing version and 
>> replacing with new version. However I want to copy a config file from 
>> previous version before uninstallation and copy to this version after 
>> installation.
>>
>> Can you please give steps to setup custom actions?
>>
>>
>>
>>
>>
>>
>> Thanks
>> Hari
>>
>> -----Original Message-----
>> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On 
>> Behalf Of Hoover, Jacob
>> Sent: Thursday, February 02, 2017 4:12 PM
>> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
>> Subject: Re: [wix-users] WiX Bundle upgrade or install new to run 
>> side by side
>>
>> The only question I have is will detect on a related bundle still 
>> properly plan (ala PlanRelatedBundle)?  If the action is detect, I 
>> don't know for certain that the plan callback will happen.  However 
>> if it's set to Upgrade, it certainly will happen and allow you to 
>> modify the result based on the user choice.
>>
>> MINOR VERSION CHANGED.
>> Bundle UpgradeCode: CODE-B
>> Product upgrade code is changed as well.
>> Version: 1.1.0.0
>> Program files directory: ProductV1.1.0 <RelatedBundle Id="Code-A"
>> Action="detect"/> <RelatedBundle Id="Code-B"
>> Action="Upgrade"/>
>>
>>
>>
>> -----Original Message-----
>> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On 
>> Behalf Of Harinatha Narisetty
>> Sent: Thursday, February 02, 2017 3:02 PM
>> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
>> Subject: Re: [wix-users] WiX Bundle upgrade or install new to run 
>> side by side
>>
>> Hoover.. do you see any issues?
>>
>> Thanks
>> hari
>>
>> -----Original Message-----
>> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On 
>> Behalf Of Harinatha Narisetty
>> Sent: Thursday, February 02, 2017 12:59 PM
>> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
>> Subject: Re: [wix-users] WiX Bundle upgrade or install new to run 
>> side by side
>>
>> [This sender failed our fraud detection checks and may not be who 
>> they appear to be. Learn about spoofing at 
>> http://aka.ms/LearnAboutSpoofing]
>>
>> Ok. This is what I am doing. My test looks like it works fine.
>>
>> Bundle UpgradeCode: CODE-A
>> Version: 1.0.0.0
>> Program files directory: ProductV1.0.0 <RelatedBundle Id="Code-A"
>> Action="Upgrade"/> Installed. Everything is great.
>> __________________________________________
>>
>> BUILD VERSION CHANGED.
>>
>> Bundle UpgradeCode: CODE-A
>> Version: 1.0.0.1
>> Program files directory: ProductV1.0.0 <RelatedBundle Id="Code-A"
>> Action="Upgrade"/> Upgraded previous version.
>> Everything is great.
>> ____________________________________________________
>>
>> Patch is released. Patch version changed Bundle UpgradeCode: CODE-A
>> Version: 1.0.1.1
>> Program files directory: ProductV1.0.0 <RelatedBundle Id="Code-A"
>> Action="Upgrade"/> Upgraded previous version.
>> Everything is great.
>> ____________________________________________________
>>
>> MINOR VERSION CHANGED.
>> Bundle UpgradeCode: CODE-B
>> Product upgrade code is changed as well.
>> Version: 1.1.0.0
>> Program files directory: ProductV1.1.0 <RelatedBundle Id="Code-A"
>> Action="detect"/> <RelatedBundle Id="Code-B"
>> Action="Upgrade"/>
>>
>> Show a screen to user as
>>
>> O Install side by side
>> O select version to upgrade
>>         O Version 1.0.1
>>
>> Based on user selection, either install side by side or install 
>> upgrade the selected version to this version ( basically installing 
>> this version, copy config files from other version and remove other version).
>>
>>
>> My test sample works fine... before I proceed with main stuuf...
>> please review this once and let me know if you see any issues.
>>
>>
>> Thanks
>> Hari
>>
>> -----Original Message-----
>> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On 
>> Behalf Of Phill Hogland
>> Sent: Thursday, February 02, 2017 12:34 PM
>> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
>> Subject: Re: [wix-users] WiX Bundle upgrade or install new to run 
>> side by side
>>
>> >>>Why would need to look for 1.2 detect code when I am authoring for
>> >>>1.2
>> itself? I am little confused.
>>
>>
>> In a purely side-by-side maybe you don't need it.  I use it to detect 
>> whether v1.2 is already installed on the system and in my case apply 
>> 'addon' or 'Patch' bundles only if it is the right base configuration 
>> detected.
>>
>> ________________________________
>> From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of 
>> Harinatha Narisetty <harinatha.narisetty at us.abb.com>
>> Sent: Thursday, February 2, 2017 10:34:35 AM
>> To: WiX Toolset Users Mailing List
>> Subject: Re: [wix-users] WiX Bundle upgrade or install new to run 
>> side by side
>>
>> I am able to see related bundle operations getting fired with 
>> relatedOperation as None.
>> When I change the version number from 1.0.0.0  to 1.0.0.1, I am 
>> seeing the detect event , but relationOperation is none. I think it 
>> should be minorUpgrade
>>
>> Am I missing anything... otherwise How do I figureout build versions( 
>> the last one digit in the version number )?
>>
>> If there is build 1.0.0.0 is installed and QA ( not user) is trying 
>> to install next day build 1.0.0.1, (upgrade code not changed), it 
>> should detect as minor upgrade so that I can replace that 1.0.0.0 
>> with
>> 1.0.0.1
>>
>>
>>
>> Thanks
>> Hari
>>
>> -----Original Message-----
>> From: Harinatha Narisetty
>> Sent: Thursday, February 02, 2017 10:33 AM
>> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
>> Subject: RE: [wix-users] WiX Bundle upgrade or install new to run 
>> side by side
>>
>> Why would need to look for 1.2 detect code when I am authoring for
>> 1.2 itself? I am little confused.
>>
>> Thanks
>> Hari
>>
>> -----Original Message-----
>> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On 
>> Behalf Of Phill Hogland
>> Sent: Wednesday, February 01, 2017 3:57 PM
>> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
>> Subject: Re: [wix-users] WiX Bundle upgrade or install new to run 
>> side by side
>>
>>
>> >>Also, What If user has 1.0, 1.1  and now he is installing 1.2
>>
>>
>> For each bundle I would:
>>
>>
>> So Bundle_v1.0 would have:
>>
>> <RelatedBundle Action='Detect' Id='Bundle_v1.0_DetectCode' />
>>
>>
>> In Bundle_v1.1 I know when authoring that I need to look for v1.0:
>>
>> <RelatedBundle Action='Detect' Id='$(var.Bundle_v1.1_DetectCode)' />
>>
>> <RelatedBundle Action='Upgrade' Id='$(var.Bundle_v1.0_UpgradeCode)' 
>> />
>>
>>
>> In Bundle_v1.2 I know when authoring that I need to look for v1.0 or 1.1:
>>
>> <RelatedBundle Action='Detect' Id='$(var.Bundle_v1.2_DetectCode)' />
>>
>> <RelatedBundle Action='Upgrade' Id='$(var.Bundle_v1.0_UpgradeCode)' 
>> />
>>
>> <RelatedBundle Action='Upgrade' Id='$(var.Bundle_v1.1_UpgradeCode)' 
>> />
>>
>> In my DetectRelatedBundle handlers I also use the result of authoring 
>> Bundle/@Tag for each bundle to help sort out which related bundle I 
>> care about, and as Jacob pointed out author the UI as desired and 
>> then author the PlanXxx handlers for the action desired for the detected related bundle.
>>
>> ________________________________
>> From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of 
>> Hoover, Jacob <Jacob.Hoover at greenheck.com>
>> Sent: Wednesday, February 1, 2017 2:12:46 PM
>> To: WiX Toolset Users Mailing List
>> Subject: Re: [wix-users] WiX Bundle upgrade or install new to run 
>> side by side
>>
>> For me, I normally use wix variables.
>>
>> Bundle.wxs:
>> <Bundle Name="..." Version="$(var.ProductVersion)"
>>   Manufacturer="$(var.Manufacturer)"
>>   UpgradeCode="$(var.UpgradeCode)"
>>   IconSourceFile="...">
>>
>> Bundle.wixproj:
>>
>>   <PropertyGroup Condition=" ... ">
>>     <Manufacturer>Foo</Manufacturer>
>>     <UpgradeCode>0F8E9B51-56F6-47B6-8C15-D748BF21C9A7</UpgradeCode>
>>     <DefineConstants>
>>       $(DefineConstants);
>>       Manufacturer=$(Manufacturer);
>>       UpgradeCode=$(UpgradeCode);
>>     </DefineConstants>
>>   </PropertyGroup>
>>
>> For each newer bundle that should offer to install an older bundle, 
>> it will need a RelatedBundle element telling the newer bundle to 
>> search for the older bundle.  Since you are using a custom MBA, you 
>> can do your UX however you like to offer check boxes.
>>
>> As for programmatically adding these, if you define a 
>> Property/Variable that is a list of guids to relate to, you might be 
>> able to do something
>> like:
>>
>> <?foreach UpCode in $(var.UpgradeCodes)?>
>>     <RelatedBundle Id="$(var.UpCode)" Action="Upgrade" /> 
>> <?endforeach?>
>>
>>
>> -----Original Message-----
>> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On 
>> Behalf Of Harinatha Narisetty
>> Sent: Wednesday, February 01, 2017 1:37 PM
>> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
>> Subject: Re: [wix-users] WiX Bundle upgrade or install new to run 
>> side by side
>>
>> Is there any way I can add this programmatically?
>> Also, What If user has 1.0, 1.1  and now he is installing 1.2
>>
>> I really want to show 1.0, 1.1 in a listbox with checkboxes and ask 
>> users to replace or leave as is or install 1.2 separate... in that 
>> case how do I handle RelatedBundle?
>>
>>
>> Thanks
>> Hari
>>
>> -----Original Message-----
>> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On 
>> Behalf Of Hoover, Jacob
>> Sent: Wednesday, February 01, 2017 2:19 PM
>> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
>> Subject: Re: [wix-users] WiX Bundle upgrade or install new to run 
>> side by side
>>
>> In the 1.1 Bundle.wxs, add <RelatedBundle 
>> Id="d0f125f6-37ab-4ec9-99c4-cb1cbd3447fa" Action="Upgrade" />
>>
>> -----Original Message-----
>> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On 
>> Behalf Of Harinatha Narisetty
>> Sent: Wednesday, February 01, 2017 12:47 PM
>> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
>> Subject: Re: [wix-users] WiX Bundle upgrade or install new to run 
>> side by side
>>
>> I am testing this. My question is If I change the upgrade code for 
>> both Bundle and Product for each version.
>> 1. Install 1.0 and 1.1 side by side... works fine.
>> 2. Install 1.1 and remove 1.0, but copy config files from 1.0 to 1.1:
>> For this scenario, how will it detect related bundles? How do I remove 1.0 ?
>>
>> I posted the little sample on Git here... Can you take a look at and 
>> write your comments..
>>
>> https://github.com/Hnarisetty/WixTest
>>
>>
>> Thanks
>> Hari
>>
>>
>>
>> -----Original Message-----
>> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On 
>> Behalf Of Hoover, Jacob
>> Sent: Wednesday, February 01, 2017 1:05 PM
>> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
>> Subject: Re: [wix-users] WiX Bundle upgrade or install new to run 
>> side by side
>>
>> You could publish it on GitHub. But really all you need to do is 
>> parameterize your builds so that the GUID's change or create separate 
>> projects for each and manually update the GUID's. I would think you 
>> would have a 1.0 branch in git, and when you switch to 1.1, on a new
>> 1.1 branch you would then update the upgrade codes. This would allow 
>> you to go back to the 1.0 branch and create a service release for those staying on 1.0.
>>
>> For the purposes of your test case, it's probably easier to duplicate 
>> the Bundle and MSI projects and manually update the GUID's.  Or if 
>> your familiar with MSBuild, you could change the wxs to use wix 
>> variables and then create a few conditional item groups in the 
>> wixproj to pass in the guid and version based upon which version your build is targeting.
>>
>> -----Original Message-----
>> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On 
>> Behalf Of Harinatha Narisetty
>> Sent: Wednesday, February 01, 2017 11:17 AM
>> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
>> Subject: Re: [wix-users] WiX Bundle upgrade or install new to run 
>> side by side
>>
>> I am using Burn. I have a simple sample app ready... is there any way 
>> to send that to you?
>> If not.
>> Here are the files: WixBA.cs is my custom bootstrapper.
>>
>> InstallationViewModel.cs
>>
>>         public InstallationViewModel(RootViewModel root)
>>         {
>>                 WixBA.Model.Bootstrapper.DetectBegin += this.DetectBegin;
>>                 WixBA.Model.Bootstrapper.DetectRelatedBundle += 
>> this.DetectedRelatedBundle;
>>                 WixBA.Model.Bootstrapper.DetectComplete += 
>> this.DetectComplete;
>>         }
>>
>>           private void Bootstrapper_PlanRelatedBundle(object sender, 
>> PlanRelatedBundleEventArgs e)
>>         {
>>             e.State = RequestState.Present;
>>         }
>>
>>         private void DetectBegin(object sender, DetectBeginEventArgs e)
>>         {
>>             this.root.DetectState = e.Installed ? DetectionState.Present :
>> DetectionState.Absent;
>>             WixBA.Model.PlannedAction = LaunchAction.Unknown;
>>         }
>>
>>          private void DetectedRelatedBundle(object sender, 
>> DetectRelatedBundleEventArgs e)
>>         {
>>
>>             code = e.ProductCode;
>>
>>         }
>>
>>
>>
>> Bundle.wxs
>> ---------------
>>
>> <?xml version="1.0" encoding="UTF-8"?> <Wix 
>> xmlns="http://schemas.microsoft.com/wix/2006/wi">
>>   <Bundle Name="Awesome Software"
>>           Version="1.0.1.0"
>>           Manufacturer="Awesome Company"
>>           Copyright="(c) All rights reserved."
>>           UpgradeCode="d0f125f6-37ab-4ec9-99c4-cb1cbd3447fa">
>>
>>     <BootstrapperApplicationRef Id="ManagedBootstrapperApplicationHost">
>>       <Payload
>> SourceFile="..\ConsoleApplication1\bin\Debug\BootstrapperCore.config" />
>>       <Payload
>> SourceFile="..\ConsoleApplication1\bin\Debug\WpfCustomControlLibrary1.dll"/>
>>       <Payload
>> SourceFile="..\ConsoleApplication1\bin\Debug\BootstrapperCore.dll"/>
>>     <Payload
>> SourceFile="..\ConsoleApplication1\bin\Debug\Microsoft.Deployment.WindowsInstaller.dll"/>
>>     </BootstrapperApplicationRef>
>>
>>     <WixVariable Id="WixMbaPrereqLicenseUrl"
>>                  Value=""/>
>>     <WixVariable Id="WixMbaPrereqPackageId"
>>                  Value=""/>
>>
>>     <Chain>
>>       <MsiPackage SourceFile="$(var.WixTest.TargetPath)"
>>                   DisplayInternalUI='no'
>>                   Visible='no'
>>                   Permanent='no'
>>                   Compressed='yes'
>>                   Vital='yes'
>>                   />
>>     </Chain>
>>   </Bundle>
>> </Wix>
>>
>> Product.wxs
>> _________________
>> <?xml version="1.0" encoding="UTF-8"?> <Wix 
>> xmlns="http://schemas.microsoft.com/wix/2006/wi">
>>   <Product Id="*"
>>            Name="WixTest"
>>            Language="1033"
>>            Version="1.0.1.0"
>>            Manufacturer="ABB"
>>            UpgradeCode="abc316ce-f5b2-46bb-abf8-5515053bbd63">
>>     <Package InstallerVersion="200"
>>              Compressed="yes"
>>              InstallScope="perMachine" />
>>
>>     <MajorUpgrade DowngradeErrorMessage='A newer version is already 
>> installed.' />
>>     <MediaTemplate EmbedCab="yes" />
>>
>>     <Feature Id="ProductFeature"
>>              Title="WixTest"
>>              Level="1">
>>       <ComponentGroupRef Id="ProductComponents" />
>>     </Feature>
>>   </Product>
>>
>>   <Fragment>
>>     <Directory Id="TARGETDIR"
>>                Name="SourceDir">
>>       <Directory Id="ProgramFiles64Folder">
>>         <Directory Id="WixTest"
>>                    Name="WixTest1.0.0" />
>>       </Directory>
>>     </Directory>
>>   </Fragment>
>>
>>   <Fragment>
>>     <ComponentGroup Id="ProductComponents"
>>                     Directory="WixTest">
>>       <Component Id="ProductComponent">
>>         <File Source="$(var.WixTester.TargetPath)" />
>>       </Component>
>>     </ComponentGroup>
>>   </Fragment>
>> </Wix>
>>
>>
>>
>> Thanks
>> Hari
>>
>> -----Original Message-----
>> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On 
>> Behalf Of Hoover, Jacob
>> Sent: Wednesday, February 01, 2017 11:34 AM
>> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
>> Subject: Re: [wix-users] WiX Bundle upgrade or install new to run 
>> side by side
>>
>> The list strips attachments.  Your UpgradeCode has to be different 
>> for 1.0, 1.1, 2.0, 2.1, etc in order to be able to support side by 
>> side installs.  That's why I suggested using burn, so that you could 
>> use RelatedBundles to remove the older bundles conditionally.
>>
>> -----Original Message-----
>> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On 
>> Behalf Of Harinatha Narisetty
>> Sent: Wednesday, February 01, 2017 8:50 AM
>> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
>> Subject: Re: [wix-users] WiX Bundle upgrade or install new to run 
>> side by side
>>
>> Bundle.wxs:
>>         UpgradeCode="d0f125f6-37ab-4ec9-99c4-cb1cbd3447fa"
>> Product.wxs:
>>         UpgradeCode="abc316ce-f5b2-46bb-abf8-5515053bbd63"
>>
>> I am not passing anything parameters to MSI...
>> private void Bootstrapper_PlanRelatedBundle(object sender, 
>> PlanRelatedBundleEventArgs e) {
>>             e.State=RequestState.Present;
>>
>> }
>>
>> I have attached my entire test project that is being held with 
>> operator for review. Please take a minute to review and advise me.
>>
>> Thanks lot.
>>
>>
>> Thanks
>> Hari
>>
>> -----Original Message-----
>> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On 
>> Behalf Of Hoover, Jacob
>> Sent: Tuesday, January 31, 2017 11:52 PM
>> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
>> Subject: Re: [wix-users] WiX Bundle upgrade or install new to run 
>> side by side
>>
>> What does the upgrade code of each of the MSI's look like?
>>
>> -----Original Message-----
>> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On 
>> Behalf Of Harinatha Narisetty
>> Sent: Tuesday, January 31, 2017 5:25 PM
>> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
>> Subject: Re: [wix-users] WiX Bundle upgrade or install new to run 
>> side by side
>>
>> private void DetectedRelatedBundle(object sender, 
>> DetectRelatedBundleEventArgs e) {
>>             //add all the bundles to a list
>>
>> }
>> Currently the above method fires once...as I have one version is 
>> already installed.
>> private void Bootstrapper_PlanRelatedBundle(object sender, 
>> PlanRelatedBundleEventArgs e) {
>>             e.State=RequestState.Present;
>>
>> }
>> This is retaining the bundle in Add/remove programs. I can see it. 
>> But the underlying MSI is removed and the corresponding folder from 
>> program files is removed as well.
>>
>> What am I doing wrong here?
>>
>> Bundle file.
>>
>> <?xml version="1.0" encoding="UTF-8"?> <Wix 
>> xmlns="http://schemas.microsoft.com/wix/2006/wi">
>>   <Bundle Name="Awesome Software"
>>           Version="1.0.1.0"
>>           Manufacturer="Awesome Company"
>>           Copyright="(c) All rights reserved."
>>           UpgradeCode="d0f125f6-37ab-4ec9-99c4-cb1cbd3447fa">
>>
>>     <BootstrapperApplicationRef Id="ManagedBootstrapperApplicationHost">
>>       <Payload
>> SourceFile="..\ConsoleApplication1\bin\Debug\BootstrapperCore.config" />
>>       <Payload
>> SourceFile="..\ConsoleApplication1\bin\Debug\WpfCustomControlLibrary1.dll"/>
>>       <Payload
>> SourceFile="..\ConsoleApplication1\bin\Debug\BootstrapperCore.dll"/>
>>     </BootstrapperApplicationRef>
>>
>>     <WixVariable Id="WixMbaPrereqLicenseUrl"
>>                  Value=""/>
>>     <WixVariable Id="WixMbaPrereqPackageId"
>>                  Value=""/>
>>
>>     <Chain>
>>       <MsiPackage SourceFile="$(var.WixTest.TargetPath)"
>>                   DisplayInternalUI='no'
>>                   Visible='no'
>>                   Permanent='no'
>>                   Compressed='yes'
>>                   Vital='yes'
>>                   />
>>     </Chain>
>>   </Bundle>
>> </Wix>
>>
>>
>> Thanks
>> Hari
>> -----Original Message-----
>> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On 
>> Behalf Of Hoover, Jacob
>> Sent: Tuesday, January 31, 2017 5:44 PM
>> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
>> Subject: Re: [wix-users] WiX Bundle upgrade or install new to run 
>> side by side
>>
>> 1.A/2.A this should happen automatically.
>> 1.B I would use a semi-custom action to schedule the copyfile from 
>> the previous install (Ref 
>> https://www.joyofsetup.com/2007/07/01/semi-custom-actions/ ) 1.C/2.B
>>   Capture the intel of related bundles from OnDetectRelatedBundle 
>> (Your bundles Should have RelatedBundle elements for prior bundles 
>> with either a detect or upgrade action on them)
>>   Based on the user selection in your BA, respond appropriately in 
>> OnPlanRelatedBundle.
>>
>> Not 100% certain on this but it would seem logical that you could set 
>> it to by default always remove the older bundles via Upgrade, and 
>> then override this when you want them to stay via OnPlanRelatedBundle.
>>
>> -----Original Message-----
>> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On 
>> Behalf Of Harinatha Narisetty
>> Sent: Tuesday, January 31, 2017 4:33 PM
>> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
>> Subject: Re: [wix-users] WiX Bundle upgrade or install new to run 
>> side by side
>>
>> Ok. I changed to have Unique Install folder for each version.
>> C:\Program files\Company\Product1.0.0 C:\Program
>> files\Company\Product1.1.0 C:\Program files\Company\Product2.0.0 
>> C:\Program files\Company\Product3.0.0
>>
>> I do see the bundle detect events getting fired. Now how to
>>
>> 1. When earlier version is found. User selection is "Upgrade"
>>         A. Install this version
>>       B. Copy the config files from previous version to this version folder
>>         c. Remove Previous Version
>> 2. When earlier version is found. User selection is "Side by Side"
>>         A. Install this version
>>       B. Do not remove previous version
>>
>> Can you help me with this?
>>
>> Thanks
>> Hari
>>
>> -----Original Message-----
>> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On 
>> Behalf Of Hoover, Jacob
>> Sent: Tuesday, January 31, 2017 5:11 PM
>> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
>> Subject: Re: [wix-users] WiX Bundle upgrade or install new to run 
>> side by side
>>
>> I don't think you can achieve this with a single MSI, in the manner 
>> your describing.  I think the most robust solution would be to have a 
>> unique install folder and upgrade code for each upgrade you 
>> release(you can still service each upgrade with patches).  Then your 
>> problem becomes, if I detect an older version, do I want to merge the 
>> configuration from it, as well should I uninstall the old version after upgrading.
>>
>> The first problem could be solved via a property driven CA in the MSI 
>> (assuming the bundle is detecting the old version and allowing the 
>> user to choose between a clean install and an upgrade), where you 
>> pass the user choice from the BA to the MSI via a Variable and a MsiProperty.
>>
>> The second problem can be solved again with the bundle detecting and 
>> optionally prompting for removal of the old version, in which you 
>> want to look at the RelatedBundle* callbacks and element.  This will 
>> allow you to relate your newer bundles with all of the prior bundles, 
>> and use the callbacks to determine if you only want to detect the 
>> related bundle or have it plan to remove it.
>>
>> -----Original Message-----
>> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On 
>> Behalf Of Harinatha Narisetty
>> Sent: Tuesday, January 31, 2017 3:55 PM
>> To: wix-users at lists.wixtoolset.org
>> Subject: [wix-users] WiX Bundle upgrade or install new to run side by 
>> side
>>
>> Hi,
>> I have a wix bundle with custom bootstrapper (and several screens) 
>> that installs a MSI package. For upgrades, I want to provide an 
>> option for user to choose either update the existing version (merge 
>> config
>> files) or install as new version. I am not sure how to achieve this.
>> Here are my bundle and prouct wxs files.
>>
>>
>> Bundle Name='My company software $(var.ShortVersionNumber)'
>>       Manufacturer='my company(r)'
>>       Version='$(var.FullVersionNumber)'
>>       UpgradeCode='D414EA8E-A3BF-44E1-B362-91E34074B55B'
>>       Compressed='yes'
>>       Copyright='(c) 2015 mycomapny(r) - All rights reserved'
>>       AboutUrl='http://www.mycompany.com'
>>       HelpUrl='http://www.mycompany.com/support'
>>       IconSourceFile='..\..\abc.ico'
>>       SplashScreenSourceFile='Splash.bmp'>
>>
>> all other nodes...
>> <MsiPackage Id='application' SourceFile='..\Output\en-us\Client.msi'
>>               DisplayInternalUI='no' Visible='no' Permanent='no'
>> Compressed='yes' Vital='yes'>
>>
>>
>>
>>
>> The Product.wxs file is
>>
>> <Wix xmlns='http://schemas.microsoft.com/wix/2006/wi' ....           >
>>
>>   <Product Id='*'
>>
>>        Name='My Company software $(var.ShortVersionNumber)'
>>
>>        Manufacturer='MyCompany(r)'
>>
>>        Version='$(var.FullVersionNumber)'
>>
>>        Language='1033'
>>
>>        Codepage='65000'
>>
>>        UpgradeCode='0D126835-8687-4A37-ADB1-EAF28724FFE4'>
>>
>>
>>
>> I have all the events subscribed in my c# code.
>>
>> Please give me some direction on how to achieve this.
>>
>>
>>
>> Thanks
>> Hari
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant 
>> http://www.firegiant.com/
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant 
>> http://www.firegiant.com/
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant 
>> http://www.firegiant.com/
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant 
>> http://www.firegiant.com/
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant 
>> http://www.firegiant.com/
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant 
>> http://www.firegiant.com/
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant 
>> http://www.firegiant.com/
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant 
>> http://www.firegiant.com/
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant 
>> http://www.firegiant.com/
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant 
>> http://www.firegiant.com/
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant 
>> http://www.firegiant.com/
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant 
>> http://www.firegiant.com/
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant 
>> http://www.firegiant.com/
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant 
>> http://www.firegiant.com/
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant 
>> http://www.firegiant.com/
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant 
>> http://www.firegiant.com/
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant 
>> http://www.firegiant.com/
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant 
>> http://www.firegiant.com/
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant 
>> http://www.firegiant.com/
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant 
>> http://www.firegiant.com/
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant 
>> http://www.firegiant.com/
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant 
>> http://www.firegiant.com/
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant 
>> http://www.firegiant.com/
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant 
>> http://www.firegiant.com/
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant 
>> http://www.firegiant.com/
>>
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant 
> http://www.firegiant.com/
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant 
> http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-users mailing list