我正在尝试创建一个安装我的 msi 的 Wix burn 引导程序。引导程序 exe 工作正常,但唯一的问题是,每当我尝试中途取消安装时,msi 中添加的自定义操作都不会停止。任何人都可以告诉如何在单击取消按钮时停止并回滚安装。提前致谢。
我正在使用WiX Burn来安装我们项目的必备条件,并且我使用ManagedBootstrapperApplicationHost来拥有自定义UI.我正在检查Windows Installer版本并将其作为先决条件安装,但需要重新启动.
如何在代码中处理重启?
我尝试在以下代码中检查它,但e.status重启时的值也是0.
private void PlanComplete(object sender, PlanCompleteEventArgs e)
{
logger.LogInfoMessage("-------------->> "+ e.Status.ToString());
if (Hresult.Succeeded(e.Status))
{
this.root.PreApplyState = this.root.State;
this.root.State = InstallationState.Applying;
WixBA.Model.Engine.Apply(this.root.ViewWindowHandle);
}
else
{
this.root.State = InstallationState.Failed;
}
}
Run Code Online (Sandbox Code Playgroud) 我创建了一个 MSI 文件来使用 WiX 3.7 安装我的程序之一。我创建了一个文件,其中包含显示在控制面板 -> 程序和功能中的公司信息,如下所示:
<?xml version="1.0" encoding="utf-8"?>
<Include>
<Property Id="ARPCOMMENTS" Value="My Service" />
<Property Id="ARPCONTACT" Value="My Company, LLC" />
<Property Id="ARPPRODUCTICON" Value="DC.ico" />
<Property Id="ARPHELPLINK" Value="http://www.mycompany.com" />
<Property Id="ARPREADME" Value=" " />
<Property Id="ARPURLINFOABOUT" Value="http://www.mycompany.com" />
<Property Id="ARPURLUPDATEINFO" Value=" " />
<Property Id="ARPHELPTELEPHONE" Value="888 888 8888" />
<Property Id="ARPAUTHORIZEDCDFPREFIX" Value=" " />
<Icon Id="DC.ico" SourceFile="Resources\DC.ico" />
</Include>
Run Code Online (Sandbox Code Playgroud)
我现在必须使用 Burn 创建一个引导程序,以包含 Crystal Reports 和 C++ 2005 Redist。在控制面板 -> 程序和功能中,不显示来自 MSI(上面的属性项目)的信息。我现在只有一些非常通用的信息。有没有办法将上述信息包含在刻录文件中,使其显示在控制面板 -> 程序和功能中?
有没有办法跳过链中的一个包?我看过“InstallCondition”并且有这样的代码。
<ExePackage Id="RoboMongo"
DisplayName="RoboMongo"
Cache="no"
Compressed="no"
PerMachine="yes"
Permanent="no"
Vital="no"
Name="redist\Robomongo-0.8.4-RC2-i386.exe"
DownloadUrl="$(var.RoboMongoUrl)"
InstallCondition="ComponentSelect_5"
InstallCommand='/Action=Install'
UninstallCommand="/Action=Uninstall"
RepairCommand ="/Action=Repair"
DetectCondition="RoboMongoInstalled">
<RemotePayload Description="????????? ????????????????? MongoDB"
Version ="0.8.4.2"
ProductName="RoboMongo"
Hash="71C17E48BC32304FA8724FFA7CA1C4C08891BC97" Size="7141182" />
Run Code Online (Sandbox Code Playgroud)
但我不想在 InstallCondition=false 上卸载它。我只想跳过它。
先感谢您。
任何人都可以指出调试WiX Custom Burn Bootstrapper所涉及的步骤吗?
我让我的MSI干净利落.但是当我在Burn bootstrapper中使用它时,自定义操作会延迟并产生问题.我想用VS2012调试我的bootstrapper.
环境
在 Visual Studio 2012/Visual Studio 2013 中使用 Bootstrapper 项目
Windows 7 企业版 SP1
维克斯工具集 3.8
细节
Setup.exe 从不运行
AppData/Local/Temp/[WixBundleName][DateTime].log 中的日志文件显示“错误 0x8007000d:无法加载主题控件”。
通常 EXE 版本在 Bundle.wxs 文件中设置。是否可以在编写安装程序后端引擎逻辑的 Bootstrapper 应用程序项目中获取此版本?我使用 WPF 创建了自定义 UI。我需要在用户界面中显示版本。我怎样才能做到这一点?请指教。下面是我的 Bootstrapper 应用程序代码。
public class MainViewModel : ViewModelBase
{
private MINAClient minaClient;
//constructor
public MainViewModel(BootstrapperApplication bootstrapper)
{
this.IsThinking = false;
this.Bootstrapper = bootstrapper;
this.Bootstrapper.ApplyComplete += this.OnApplyComplete;
this.Bootstrapper.DetectPackageComplete += this.OnDetectPackageComplete;
this.Bootstrapper.PlanComplete += this.OnPlanComplete;
this.Bootstrapper.DetectComplete += this.DetectComplete;
this.Bootstrapper.CacheAcquireProgress += (sender, args) =>
{
this.cacheProgress = args.OverallPercentage;
this.Progress = (this.cacheProgress + this.executeProgress) / 2;
};
this.Bootstrapper.ExecuteProgress += (sender, args) =>
{
this.executeProgress = args.OverallPercentage;
this.Progress = (this.cacheProgress + this.executeProgress) / 2;
};
minaClient = …Run Code Online (Sandbox Code Playgroud) 我有一个 Wix Bundle Bootstrapper 安装 2 个 MSI 文件。如果我使用引导程序,“添加/删除程序”列表仅包含引导程序的条目。
如果我单独使用 MSI 文件,则会在此列表中获得两个单独的条目,每个条目对应一个 MSI 文件。
官方记录的控制面板“添加/删除程序”列表中的条目是如何构建的?
具体来说,他们告诉我们——
使用 Windows Installer 配置添加/删除程序
您可以通过在应用程序的 Windows Installer 程序包中设置某些安装程序属性的值来提供在控制面板中配置“添加/删除程序”所需的所有信息。设置这些属性会自动将相应的值写入注册表。(...)
他们还告诉我们
卸载注册表项
以下安装程序属性给出了写入注册表项下的值:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall这些值存储在由应用程序的产品代码 GUID 标识的子项中。
但这里有一个条目是否足够以及需要哪些子项或值条目并不明显。
我需要一些帮助来创建没有许可证 UI 的 WiX Bootstrapper。我有一个 WiX MSI 设置,其中包含以下所有屏幕:欢迎、许可证、目标文件夹和进度 UI。
此 MSI 应使用 WiX Bundle 通过 Bootstrap.exe 运行。当我运行它时,我可以看到两个许可证屏幕 - 一个是 Bootstrapper,另一个是我的 MSI 屏幕。那么我怎样才能消除/隐藏引导程序许可证 UI。
有没有一种方法可以直接运行安装而无需单击 Bootstrapper UI 中的安装按钮?
我正在尝试为WiX和Burn 创建自定义UI .我已经按照我发现的一些指南进行了操作,到目前为止,我有一个项目具有以下内容,它继承自BootstrapperApplication.
namespace MyBA
{
public class TestBA : BootstrapperApplication
{
protected override void Run()
{
MessageBox.Show("My BA is running");
this.Engine.Quit(0);
}
}
}
Run Code Online (Sandbox Code Playgroud)
在AssemblyInfo.cs中:
[assembly: BootstrapperApplication(typeof(TestBA))]
Run Code Online (Sandbox Code Playgroud)
然后在我的Bootstrapper项目中,我有以下内容.
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Bundle Name="MyApplication"
Version="1.0.0"
Manufacturer="Acme Ltd"
UpgradeCode="F84A4058-FDF6-4218-BCB5-12C811DA3C99"
Condition="NOT ((VersionNT = 600 AND ServicePackLevel >=2) OR (VersionNT >= 601))"
IconSourceFile="$(var.MyApplicationInstallerRequiredFiles.ProjectDir)logo.ico"
SplashScreenSourceFile="$(var.MyApplicationInstallerRequiredFiles.ProjectDir)Splashscreen.bmp"
DisableRepair="no"
DisableRemove="no"
DisableModify="no">
<WixVariable Id="WixMbaPrereqPackageId"
Value="Netfx4Full" />
<WixVariable Id="WixMbaPrereqLicenseUrl"
Value="NetfxLicense.rtf" />
<WixVariable Id="WixStdbaLicenseRtf"
Value="$(var.MyApplicationInstallerRequiredFiles.ProjectDir)Licence.en-gb.rtf" />
<WixVariable Id="WixStdbaLogo"
Value="$(var.MyApplicationInstallerRequiredFiles.ProjectDir)logoInstallSmall.bmp" />
<BootstrapperApplicationRef Id='ManagedBootstrapperApplicationHost'>
<Payload Name='BootstrapperCore.config'
SourceFile='$(var.MyApplicationInstallerRequiredFiles.ProjectDir)Bootstrapper\MyBA.BootstrapperCore.config' …Run Code Online (Sandbox Code Playgroud)