我使用的维克斯3.7。 我试图创建一个安装我的MSI威克斯烧伤引导程序。 我在BA UI增加了两个按钮,用于安装和取消。 我使用C#为BA的UI设计。
我已经添加了follwoing代码启动安装在安装按钮。
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);
安装工作正常。 但我有在中取消安装问题。
我看到引导器应用回滚链接。 但我不能能够得到约IDCANCEL以及如何从触发按钮单击错误事件的想法。
谁能告诉如何通过点击取消按钮是在BA UI详细停止安装?