[wix-users] WixStdBA supporting Upgrades

Phill Hogland phill.hogland at rimage.com
Tue Jun 21 07:00:10 PDT 2016


Not to distract from the good advice that Jacob has provided, I would recommend using the WixDifxAppExtension in a MSI to install the drivers rather than chaining the exe based driver bootstrappers.  I install both third-party USB drivers which come with a exe installer and internal drivers.  I build a separate, platform specific MSI for each of my drivers, even for the third-party driver which I redistribute.    I have found that chucking the exe and passing the drivers INF to the WixDifxAppExtesnsion to be a much more reliable approach.  I moved most of my bundles from WixStdBA to an mba a couple of years ago, but prior to that change I did not have difficult doing upgrades with a chain of exe and msi packages.  I did however configure my build process to assure that the bundle version was incremented every time I rebuilt it, regardless of whether any of the packages changed or not.  and I agree with Jacob's advice to focus on the core behavior prior to messing with the bundle self update functionality (which did not exist when I was using WixStdBA in 3.7/3.8).

________________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Hoover, Jacob <Jacob.Hoover at greenheck.com>
Sent: Tuesday, June 21, 2016 8:42:37 AM
To: WiX Toolset Users Mailing List
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/


More information about the wix-users mailing list