WiX 安装程序 - 多次运行具有不同属性的 MSI? [英] WiX Installer - Run an MSI multiple times with different properties?

查看:30
本文介绍了WiX 安装程序 - 多次运行具有不同属性的 MSI?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 WiX 工具集(我的第一个)构建引导程序.它用于 Microsoft Flight Sim 系列的附加包.MFSF 有多个版本,客户通常希望将我们的附加包安装到多个模拟器中.这自然意味着将许多相同的文件安装到多个不同的根目录中.我知道我可以通过将一个属性从引导程序传递到 MsiPackage 来轻松选择一个根文件夹.但是有没有办法让软件包安装到多个根文件夹?

I am building a bootstrapper using WiX toolset (my first). It is for an add-on package for the Microsoft Flight Sim family. There are several versions of MFSF and customers often want to install our add-on package into multiple simulators. This naturally means installing many of the same files into multiple different root directories. I know I can easily choose ONE root folder by passing a property from the bootstrapper to the MsiPackage. But is there a way to get the package to install to multiple root folders?

我的标题可能有点误导 - 两次运行相同的 MSI 很可能是一个很大的禁忌.我真的在问将一组文件安装到多个用户选择的位置,而无需在引导程序中多次包含它们的最佳方向是什么?

My title is perhaps slightly misleading - running the same MSI twice may well be a massive no-no. I'm really asking what is the best direction I can take to install a group of files to multiple user-selected locations, without including them multiple times in my bootstrapper?

谢谢法利

推荐答案

这听起来像是我必须在 IsWiX 安装程序中执行的操作才能与 Visual Studio 集成.我有一堆文件需要安装到每个检测到的 VS 版本中.为此,我:

This sounds like what I have to do in my IsWiX installer to integrate with Visual Studio. I have a bunch of files that need to be installed into every detected version of VS. To do this I:

1) 创作 AppSearch 以设置目的地的属性.

1) Author AppSearch to set properties with destinations.

2) 创建组件并安装到我的目录.这些实际上从未被任何东西使用过,但它是无害的.

2) Create components and install to my directory. These aren't ever actually used by anything but it's harmless.

3) 使用 CopyFile 元素将文件复制到目的地.如果 AppSearch 未找到目的地,则 MSI 会隐式跳过重复项.

3) Use CopyFile elements to duplicate the files to the destinations. If AppSearch didn't find a destination then the duplication is implicitly skipped by MSI.

https://github.com/iswix-llc/iswix/blob/master/Source/Installer/IsWiX/Code/Product.wxs

https://github.com/iswix-llc/iswix/blob/master/Source/Installer/IsWiXNewAddInMM/IsWiXNewAddInMM.wxs

这篇关于WiX 安装程序 - 多次运行具有不同属性的 MSI?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆