[wix-users] WixStdBA supporting Upgrades

Hoover, Jacob Jacob.Hoover at greenheck.com
Tue Jun 21 05:34:35 PDT 2016


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/



More information about the wix-users mailing list