提取Burn bootstrapper的内容

时间:2014-11-05 03:28:36

标签: wix burn

我在WiX Burn引导程序中捆绑了一个MSI软件包。我可以从目标机器上的捆绑包中提取此MSI吗?

4 个答案:

答案 0 :(得分:29)

您需要使用WiX附带的dark.exe实用程序。

dark.exe -x temp <installer>

答案 1 :(得分:5)

在有人实施this feature之前,捆绑包无法自行提取。

答案 2 :(得分:0)

如果您正在使用自定义引导程序应用程序,则可以在捆绑包中提取嵌入的.msi,然后使用WiX SDK提取该.msi的内容。

简短的回答是,您可以使用Unbinder类从捆绑包中提取MSI文件:

unbinder = new Unbinder();
unbinder.Unbind(bundlePath, OutputType.Bundle, tmpFolder);
unbinder.DeleteTempFiles();

然后,使用InstallPackge类提取文件:

using (var msiPackage = new InstallPackage(msiFilePath, DatabaseOpenMode.Transact) { WorkingDirectory = _targetFolder })
{
  using (var session = Microsoft.Deployment.WindowsInstaller.Installer.OpenPackage(msiPackage, ignoreMachineState: true))
  {
     msiPackage.ExtractFiles(fileKeysToInstall);
  }
  msiPackage.Close()
}

这是您需要做的非常简化的版本。我已经撰写了一篇博文,其中包含更多详细信息,您可以在此处找到:http://www.wrightfully.com/extracting-msi-files-without-running-the-installer

重要说明:这不会运行任何自定义操作,因此请务必考虑到这一点。

答案 3 :(得分:-1)

提取WiX Toolset安装.exe软件包很容易。 只需使用WiX Toolset中的dark.exe。

例如:

C:\Program Files (x86)\WiX Toolset v3.11\bin\dark.exe c:\temp\myInstaller.exe -x c:\temp\myInstallerFiles
相关问题