【发布时间】:2015-07-21 16:42:25
【问题描述】:
我使用的是 Wix 3.7。我正在尝试创建安装我的 msi 的 wix burn 引导程序。我在我的 BA UI 中添加了两个按钮用于安装和取消。我正在使用 C# 进行 BA UI 设计。
我在安装按钮中添加了以下代码以启动安装。
MySampleBA.Model.Engine.Detect();
MySampleBA.hwnd = IntPtr.Zero;
MySampleBA.Model.Bootstrapper.PlanBegin += this.PlanBegin;
MySampleBA.Model.Bootstrapper.DetectPackageComplete += this.DetectedPackage;
MySampleBA.Model.Bootstrapper.DetectComplete += this.DetectComplete;
MySampleBA.Model.Bootstrapper.PlanPackageBegin += this.PlanPackageBegin;
MySampleBA.Model.Bootstrapper.PlanComplete += this.PlanComplete;
MySampleBA.Model.Bootstrapper.ExecuteMsiMessage += this.ExecuteMsiMessage;
MySampleBA.Model.Bootstrapper.ExecuteProgress += this.ApplyExecuteProgress;
MySampleBA.Model.Bootstrapper.PlanMsiFeature += this.PlanMsiFeature;
MySampleBA.Model.Bootstrapper.PlanPackageComplete += this.PlanPackageComplete;
MySampleBA.Model.Bootstrapper.Progress += this.ApplyProgress;
MySampleBA.Model.Bootstrapper.CacheAcquireProgress += this.CacheAcquireProgress;
MySampleBA.Model.Bootstrapper.CacheComplete += this.CacheComplete;
MySampleBA.Model.Bootstrapper.Error += this.ExecuteError;
MySampleBA.Model.Bootstrapper.ExecutePackageComplete += this.ExecuteComplte;
并使用
启动安装 MySampleBA.Model.Engine.Plan(LaunchAction.Install);
MySampleBA.Model.Engine.Apply(MySampleBA.hwnd);
安装工作正常。但是我在中途取消安装时遇到问题。
我看到了 bootstrapper application rollback 链接。但我无法了解 IDCANCEL 以及如何通过单击按钮触发错误事件。
任何人都可以通过单击 BA UI 中的取消按钮详细说明如何停止安装吗?
【问题讨论】:
标签: wix bootstrapper burn