WiX IIS 配置数据库属性
有没有办法在 IIS6 的 WiX 中获取 Enable32BitAppOnWin64
配置数据库属性?
我正在安装一个 Web 应用程序,需要在 IIS 设置为 32 位模式的 64 位计算机上运行 aspnet_regiis.exe
。为了获取 exe 的路径,我使用以下方法:
<!--<?if $(var.Platform) = x64 ?>-->
<SetProperty Id="ASPNETREGIIS" Sequence="execute" Before="ConfigureIIs" Value="[NETFRAMEWORK20INSTALLROOTDIR64]aspnet_regiis.exe" />
<!--<?else ?>
<SetProperty Id="ASPNETREGIIS" Sequence="execute" Before="ConfigureIIs" Value="[NETFRAMEWORK20INSTALLROOTDIR]aspnet_regiis.exe" />
<?endif ?>-->
但是,当启用 32 位模式时,我不能依赖平台来获取 exe 的正确路径。
Is there a way to get the Enable32BitAppOnWin64
metabase property in WiX for IIS6?
I'm installing a web app and need to run aspnet_regiis.exe
on a 64bit machine that has IIS set to 32bit mode. To get the path to the exe, I'm using the following:
<!--<?if $(var.Platform) = x64 ?>-->
<SetProperty Id="ASPNETREGIIS" Sequence="execute" Before="ConfigureIIs" Value="[NETFRAMEWORK20INSTALLROOTDIR64]aspnet_regiis.exe" />
<!--<?else ?>
<SetProperty Id="ASPNETREGIIS" Sequence="execute" Before="ConfigureIIs" Value="[NETFRAMEWORK20INSTALLROOTDIR]aspnet_regiis.exe" />
<?endif ?>-->
However, when 32bit mode is enabled, I can't rely on the platform to get the correct path of the exe.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
WiX 中没有标准方法来执行此操作 - 您需要自定义操作。它应该是直接 CA 并且它将设置一个属性,您将在您的条件中使用该属性。我猜这是一个示例代码,它可以满足您的需要:
另请注意,在您的示例中,您使用构建时变量从两个 SetProperty 元素中进行选择。如果您有 2 个 MSI 软件包(每个平台一个),那么这将起作用。在这种情况下,您的每个 MSI 包都将具有正确设置的属性。您现在添加的额外要求(检查 IIS 位数模式)迫使您将检查移至安装时。因此,您必须以某种方式重新设计您的条件逻辑。
There's no standard way in WiX to do this - you'll need a custom action. It should be immediate CA and it will set a property, which you'll use in your conditions. This is a sample code which does what you need, I guess:
Note also, that in your sample you use build-time variables to choose from two SetProperty elements. This will work if you have 2 MSI packages, one for each platform. In this case, each of your MSI package will have correctly set property. The extra requirement you add now (check IIS bitness mode) forces you to move the check to install-time. Hence, you'll have to rework your condition logic somehow.