Reputation: 195
I am trying to make an update of bundle which uses custom bootstrapper application, and I don't undestand how to do it. At fist I tried to set in BA UpdateReplace as a LaunchAction, but it didn't work at all. After reading this, i tried to use Install as LaunchAction.
I am trying to increase Version of bundle, UpgradeCode is fixed. Everything in bundle is fixed, only Version is changed.
Log file of new bundle breaks in two parts. First part detects existing packages and related bundle (old version, operation: MajorUpgrade), plans packages and uninstallation for old bundle. Then first log end by this line:
Applying execute package: {9b21f135-98c9-4126-bd07-2b64c9aaa6f5}, action: Uninstall, path: C:\ProgramData\Package Cache\{9b21f135-98c9-4126-bd07-2b64c9aaa6f5}\Bootstrapper.exe, arguments: '"C:\ProgramData\Package Cache\{9b21f135-98c9-4126-bd07-2b64c9aaa6f5}\Bootstrapper.exe" -uninstall -quiet -burn.related.upgrade -burn.ancestors={c641576c-eee6-47c9-bf0c-00c42e8ff5c1} -burn.filehandle.self=984'
The second log file contains this information:
Burn v3.11.1.2318, Windows v10.0 (Build 17763: Service Pack 0), path: C:\ProgramData\Package Cache\{9b21f135-98c9-4126-bd07-2b64c9aaa6f5}\Bootstrapper.exe
Initializing string variable 'Var1' to value 'false'
Initializing string variable 'Var2' to value 'false'
This bundle is being run by a related bundle as type 'Upgrade'.
Command Line: '"-burn.clean.room=C:\ProgramData\Package Cache\{9b21f135-98c9-4126-bd07-2b64c9aaa6f5}\Bootstrapper.exe" -burn.filehandle.attached=616 -burn.filehandle.self=632 -uninstall -quiet -burn.related.upgrade -burn.ancestors={c641576c-eee6-47c9-bf0c-00c42e8ff5c1} -burn.filehandle.self=984 -burn.embedded BurnPipe.{6DD039C2-BF8D-4A6E-B96B-3EA4784A1B37} {7B93845A-F588-4A34-97FD-8243D81D5B26} 7948'
Setting string variable 'WixBundleLog' to value 'C:\Users\BALAKI~1.ELE\AppData\Local\Temp\Производственная_система_20200312142440.log'
Setting string variable 'WixBundleManufacturer' to value 'Kirumata'
Loading managed bootstrapper application.
Creating BA thread to run asynchronously.
And nothing else. No exceptions or errors.
In Programs and Features two bundles with different versions are present. So, as I understand, new version was installed, but old one wasn't removed.
The question is: what is going on here and how to make it work?
Upvotes: 1
Views: 846
Reputation: 195
Okay, finally I have found the way to manage an update.
First of all, we need to create new Bundle with same UpgradeCode but greater version. And we need to start LaunchAction = Install in Bundle bootstrapp application.
Burn will Install new Bundle and after that Uninstall old version. That is the key: method Run() of the custom BA will be restarted, but second start will be in silent mode. So we need to manage installation both by UI and in silent mode. Like this:
if (this.Command.Display == Display.Full)
{
//UX
view.Show();
}
else
{
//Some kind of silent installation
model.PlanAction(this.Command.Action);
model.ApplyAction();
}
Upvotes: 1