[wix-users] WixStdBA supporting Upgrades

Stephen Downard stephen.downard at medfusion.com
Tue Jun 21 12:04:51 PDT 2016


Can you be more specific? I'm not following what you are asking.


-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Phill Hogland
Sent: Tuesday, June 21, 2016 3:03 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] WixStdBA supporting Upgrades

How is it authored?

________________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Stephen Downard <stephen.downard at medfusion.com>
Sent: Tuesday, June 21, 2016 2:01:12 PM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] WixStdBA supporting Upgrades

A follow up test reproduces my original problem.  Having v1 installed I proceed to manually upgrade by double clicking on v2.  The Bundle/MSI portion of the installation is upgraded but the ExePackages are uninstalled (due to the DetectCondition).  Note, I removed all custom logic within OnDetectPackageComplete( ) and changed the versions and timestamps on the ExePackage executables within v2 bundle.  The only difference is that the uninstall does not prompt for source but half of the total solution is only installed anyway (non deployable).

Thoughts on a solution?

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Stephen Downard
Sent: Tuesday, June 21, 2016 10:12 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] WixStdBA supporting Upgrades

In regards to the question about the differences between bundles that answer is that I simply bumped the version of the Bundle and MSI and obviously the ExePackages are not versioned.

Since our goal was to support automatic updates, that's where I started and I haven't manually attempted to upgrade from v1 to v2 simply by executing v2 on a system with v1.  I will try that and get back to you.

The upgrade scenario that does work is on a first-time install, the bundle checks for an update and if available downloads and executes.  Works perfect.

The scenario when the installation exists and the bundle is running in a maintenance mode, this is where upgrade is failing.  That problem as mentioned is related to DetectCondition.  The Bundle removes the ExePackages but does not reconfigure "planned packages" to "install" from the update.  I attempt to hack it.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Hoover, Jacob
Sent: Tuesday, June 21, 2016 9:43 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] WixStdBA supporting Upgrades

Don't worry about self updating within the BA quite yet.  Build a v1.0 and a v2.0 bundle, and manually upgrade to 2 by installing 1 then 2, and verify that part works.

For your upgrade, is there a difference between v1 and v2 of the exe package?

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Stephen Downard
Sent: Tuesday, June 21, 2016 7:58 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] WixStdBA supporting Upgrades

Believe me I wish it was that simple but that's not my experience.   Originally, I was only calling SetUpdate but due to "DetectCondition" Wix would determine that it should uninstall my ExePackages.  I know this because I am logging the command passed into the ExePackage which is equal to the value of the "UninstallCommand" value.  The architecture is such that the ExePackages run a common executable to control the install/uninstall of 3rd party installations.  I use the Bundle Install/UninstallCommands to pass into the executable the installation operation (install/uninstall...).  I observed the hashing problem whereby if a binary has multiple copies the engine would remove it so to counter that I have unique source directories and then timestamp the executable with different values.  I attempted to control the states within OnDetectPackageComplete( ) but any logic is counter-intuitive and the end result is that I am able to control the installation (for upgrades) but it ap
 pears that the existing caches are used, not from the updated package and the uninstall prompts for source.

Any suggestions are welcome.

Thanks!

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Hoover, Jacob
Sent: Tuesday, June 21, 2016 8:35 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] WixStdBA supporting Upgrades

I think you are over thinking it. The SetUpdate call should cause your existing BA to download/cache/invoke the update BA and exit.  When the update BA runs, if the user chooses to install, it should detect the related bundle and remove it after successfully installing any new packages or updates.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Stephen Downard
Sent: Monday, June 20, 2016 4:08 PM
To: wix-users at lists.wixtoolset.org
Subject: [wix-users] WixStdBA supporting Upgrades

In attempt to support upgrades via a shortcut and using WixStdBA a link is configured to execute the cached Wix Bundle which references the ARP uninstall registry information to retrieve the original BundleCachePath.  The cached bundle gets executed, evaluates the command line from the shortcut and then runs logic to check for an update.  If an update is available it is downloaded, m_pEngine->SetUpdate() is called and the installation process continues.  The current Wix "planned package" logic detects that packages exists so then packages are configured to be uninstalled.  To counter that logic I nullify the "DetectCondition" so that the "planned packages" execute state will be set to "install".   Now that Wix has been fooled into installing, I notice in the that the cache paths (payload paths) being referenced are the same paths from the original Bundle.   Once SetUpdate( ) is called shouldn't the referenced paths be different and associated to the update bundle?  A portion
 of the log file is below and you will notice errors related to "find payload" and "cache payload".  Finally, after the update has completed the system may appear to be configured correctly with having the "planned packages" installed but when the uninstall is executed it prompts for source.

Has anyone been able to configure WixStdBa to update an existing installation?  Note, the same update logic I have customized within WixStdBa will work when processed during a first time install.  Which means during initial execution if an update is detected and SetUpdate( ) called then the update is downloaded and installed correctly.  As detailed previously, if a maintenance operation is executed WixStdBa doesn't seem to correctly configure payloads and cache folders after SetUpdate( ) is called.

Session begin, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{50651704-5b5c-4c91-9647-4a926d0b1187}, options: 0x7, disable resume: No
[0728:072C][2016-06-20T12:43:19]i000: Caching bundle from: 'C:\Users\inst_tst\AppData\Local\Temp\{D0B49A06-B6C5-40C4-81E9-067A5512A530}\.be\MyBundle.exe' to: 'C:\ProgramData\Package Cache\{50651704-5b5c-4c91-9647-4a926d0b1187}\MyBundle.exe'
[0728:072C][2016-06-20T12:43:19]i320: Registering bundle dependency provider: {50651704-5b5c-4c91-9647-4a926d0b1187}, version: 1.3.4.0
[0728:072C][2016-06-20T12:43:19]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{50651704-5b5c-4c91-9647-4a926d0b1187}, resume: Active, restart initiated: No, disable resume: No
[0728:0698][2016-06-20T12:43:19]i304: Verified existing payload: DeviceAppInstall at path: C:\ProgramData\Package Cache\DE411EC5121CEC0762CB754C561ABE3ED3F29F7F\DeviceApp\DeviceAppBootstrap.exe.
[0B84:0978][2016-06-20T12:43:19]i000: WIXSTDBA: OnCacheAcquireProgress() - container/package: DeviceAppInstall, payload: DeviceAppInstall, progress: 15872, total: 15872, overall progress: 100%
[0728:0698][2016-06-20T12:43:19]i304: Verified existing payload: DeviceAppInstaller at path: C:\ProgramData\Package Cache\DE411EC5121CEC0762CB754C561ABE3ED3F29F7F\DeviceApp\DeviceApp USB driver.exe.
[0B84:0978][2016-06-20T12:43:19]i000: WIXSTDBA: OnCacheAcquireProgress() - container/package: DeviceAppInstall, payload: DeviceAppInstaller, progress: 9884133, total: 9884133, overall progress: 100%
[0728:0698][2016-06-20T12:43:19]i304: Verified existing payload: DeviceAppAppConfig at path: C:\ProgramData\Package Cache\DE411EC5121CEC0762CB754C561ABE3ED3F29F7F\DeviceApp\DeviceAppBootstrap.exe.config.
[0B84:0978][2016-06-20T12:43:19]i000: WIXSTDBA: OnCacheAcquireProgress() - container/package: DeviceAppInstall, payload: DeviceAppAppConfig, progress: 2211, total: 2211, overall progress: 100%
[0B84:0978][2016-06-20T12:43:19]i000: WIXSTDBA: OnProgress() - progress: 14%, overall progress: 14%
[0728:0698][2016-06-20T12:43:19]e000: Error 0x80070002: Failed to find payload: PaymentApp in working path: C:\Users\inst_tst\AppData\Local\Temp\{D0B49A06-B6C5-40C4-81E9-067A5512A530}\PaymentApp and unverified path: C:\ProgramData\Package Cache\.unverified\PaymentApp
[0728:0698][2016-06-20T12:43:19]e000: Error 0x80070002: Failed to cache payload: PaymentApp
[0B84:0978][2016-06-20T12:43:19]e314: Failed to cache payload: PaymentApp from working path: C:\Users\inst_tst\AppData\Local\Temp\{D0B49A06-B6C5-40C4-81E9-067A5512A530}\PaymentApp, error: 0x80070002.
[0B84:0978][2016-06-20T12:43:19]e349: Application requested retry of payload: PaymentApp, encountered error: 0x80070002. Retrying...
[0728:0698][2016-06-20T12:43:19]i305: Verified acquired payload: PaymentApp at path: C:\ProgramData\Package Cache\.unverified\PaymentApp, moving to: C:\ProgramData\Package Cache\1E7F3DF9F9C12AE44F829AFDF9399CEF70C043B2\Element\ElementBootstrap.exe.
[0B84:0978][2016-06-20T12:43:19]i000: WIXSTDBA: OnCacheAcquireProgress() - container/package: PaymentApp, payload: PaymentApp, progress: 15872, total: 15872, overall progress: 100%
[0728:0698][2016-06-20T12:43:19]i305: Verified acquired payload: PaymentAppPayload at path: C:\ProgramData\Package Cache\.unverified\PaymentAppPayload, moving to: C:\ProgramData\Package Cache\1E7F3DF9F9C12AE44F829AFDF9399CEF70C043B2\Element\ElementInstall.exe.
[0B84:0978][2016-06-20T12:43:19]i000: WIXSTDBA: OnCacheAcquireProgress() - container/package: PaymentApp, payload: PaymentAppPayload, progress: 107814928, total: 107814928, overall progress: 100%
[0728:0698][2016-06-20T12:43:19]i305: Verified acquired payload: ElementAppConfig at path: C:\ProgramData\Package Cache\.unverified\ElementAppConfig, moving to: C:\ProgramData\Package Cache\1E7F3DF9F9C12AE44F829AFDF9399CEF70C043B2\Element\ElementBootstrap.exe.config.
[0B84:0978][2016-06-20T12:43:19]i000: WIXSTDBA: OnCacheAcquireProgress() - container/package: PaymentApp, payload: ElementAppConfig, progress: 2211, total: 2211, overall progress: 100%
[0B84:0978][2016-06-20T12:43:19]i000: WIXSTDBA: OnProgress() - progress: 28%, overall progress: 28%
[0728:0698][2016-06-20T12:43:19]e000: Error 0x80070002: Failed to find payload: PaymentMsiPackage in working path: C:\Users\inst_tst\AppData\Local\Temp\{D0B49A06-B6C5-40C4-81E9-067A5512A530}\PaymentMsiPackage and unverified path: C:\ProgramData\Package Cache\.unverified\PaymentMsiPackage
[0728:0698][2016-06-20T12:43:19]e000: Error 0x80070002: Failed to cache payload: PaymentMsiPackage
[0B84:0978][2016-06-20T12:43:19]e314: Failed to cache payload: PaymentMsiPackage from working path: C:\Users\inst_tst\AppData\Local\Temp\{D0B49A06-B6C5-40C4-81E9-067A5512A530}\PaymentMsiPackage, error: 0x80070002.
[0B84:0978][2016-06-20T12:43:19]e349: Application requested retry of payload: PaymentMsiPackage, encountered error: 0x80070002. Retrying...
[0728:0698][2016-06-20T12:43:19]i305: Verified acquired payload: PaymentMsiPackage at path: C:\ProgramData\Package Cache\.unverified\PaymentMsiPackage, moving to: C:\ProgramData\Package Cache\{42D44AE1-1881-45B5-B73C-015412343407}v1.3.4.0\PaymentAppFld\p.msi.
[0B84:0978][2016-06-20T12:43:19]i000: WIXSTDBA: OnCacheAcquireProgress() - container/package: PaymentMsiPackage, payload: PaymentMsiPackage, progress: 839680, total: 839680, overall progress: 100%
[0B84:0978][2016-06-20T12:43:19]i000: WIXSTDBA: OnProgress() - progress: 42%, overall progress: 42%
[0B84:0B88][2016-06-20T12:43:19]i000: WIXSTDBA: OnExecuteProgress() - package: DeviceAppInstall, progress: 0%, overall progress: 0%

____________________________________________________________________
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