WiX Transform 可以使用 MSBuild 进程而不是 MSIExec

Can WiX Transform use the MSBuild process instead of the MSIExec

我有兴趣通过使用 WiX 转换文件自定义使用 WiX 的安装过程。不幸的是,Fire Giant 站点只有在 Candle、Light 和 Torch 可执行文件上使用 MSIExec 进程的示例。

我将如何使用我当前的 WiX 安装,它利用环境变量作为路径进行转换?

我正在寻找一些好的例子。

谢谢,

Github.com: Based on your comments: here is a link to a sample I found on github.com on how to use torch.exe from the WiX toolkit. Here we see it used to create a language transform (not tested). And a rudimentary, canned search for more.


Similar Answer: . Windows Installer Transforms (MSDN) change an existing MSI file to run with different settings than the original MSI file had built-in.

Symantec has a good article here: About Transforms. Transforms are most commonly used for corporate packaging to enforce company standards (shortcut location, remove undesired components, enforce fixes, etc...).


Transforms:如果您的意思是 Windows 安装程序转换,如 "MyTransform.mst" ,那么这是一个通用的 Windows 安装程序构造,根本不是 WiX-specific 的东西。只是先指出这一点。这些构造是可以在运行时应用于原始 MSI 文件的小型数据库片段。 MSI 文件实际上 SQL-databases 在幕后。

Orca is Microsoft's own official MSI tool, it is installed with Visual Studio and the Windows SDK. Try searching for Orca-x86_en-us.msi - under Program Files (x86) and install the MSI if found.

创建转换:可以使用Orca(或 - towards bottom - there are also commercial MSI tools).使用Orca: 1) 打开一个MSI, 2) go Transform => New Transform, 3) 现在在 MSI 中更改任何你喜欢的东西 4) 最后去 Tranform => Generate Transform...

应用转换:转换在运行时应用到 MSI 文件,如下所示:

msiexec.exe /i C:\MySetup.msi TRANSFORMS=C:\MyTransform.mst

可以将多个转换应用于单个 MSI(此处还应用了语言转换):

msiexec.exe /i C:\MySetup.msi TRANSFORMS="C:33.mst;C:\MyTransform.mst"

链接:

  • How to make better use of MSI files
  • Can the resulting command line be determined after running an .msi installer?
  • Some more details on transforms from a different answer