Wix Installation - Using Burn to have Managed UI & Displaying Same Progress Text as Built In dialogs

后端 未结 1 1796
无人及你
无人及你 2021-02-06 14:15

I am using Wix Burn to install per-requisites of our project, I have used ManagedBootstrapperApplicationHost to have custom UI, I have been following project available

相关标签:
1条回答
  • 2021-02-06 14:46

    The wixstdba does not show the action data progress messages today. There was someone talking about adding the feature on the wix-devs mailing list but that has not happened yet. It's simply a matter of adding code like you have in the managed case to the wixstdba (that doesn't have it yet).

    If you just want to display the name of the package being installed the way the wixstdba does it, then you'll want to handle the Engine.OnCachePackageBegin() and Engine.ExecutePackageBegin() callbacks. Those callbacks tell you when a package begins to be downloaded and then installed respectively. As part of the args to those callbacks you'll be provided the package id.

    To get the friendly display name, you can read the BootstrapperApplicationData.xml that is automatically included next to your Bootstrapper Application .dll. In there are WixPackageProperties elements that provide lots of information about the packages in the bundle, including the DisplayName.

    --- Sorry, the following is an answer to a question that wasn't asked. ---

    The Engine.ExecuteMsiMessage() callback is called when the Windows Installer displays a message (like action data or a request to prompt the user for input). Progress is provided via a three different callbacks.

    1. You can get the overall progress via the Engine.Progress callback. This is a very coarse grained progress that essentially moves as each package is cached and executed.

    2. You can get the overall and individual package progress via the Engine.CacheAcquireProgress. This progress moves as each package is downloaded/copied and verified to be placed in the Package Cache.

    3. You can get the overall and individual package progress via the Engine.ExecuteProgress callback. This progress moves as each package is installed/repaired/uninstalled.

    So the Engine.Progress shows you the total overall progress and is very easy to use for a single progress bar but the progress bar will not move very smoothly. You can get a smoother overall progress by adding the Engine.CacheAcquireProgress to the Engine.ExecuteProgress. Note: that will give you a progress bar that goes to 200.

    You can see how the WixBA handles all this in the src\Setup\WixBA\ProgressViewModel.cs file.

    0 讨论(0)
提交回复
热议问题