Wix:显示条件消息框而不取消

时间:2011-11-23 08:37:45

标签: wix

是否有某种方法可以显示消息框,但由于某些情况但继续安装?

如果他的内存较少,我想告知用户建议的内存量。

如果我使用

<Condition Message="For running $(var.ProductName), 4GB of physical memory are recommended.">
    <![CDATA[PhysicalMemory > 3500]]>
</Condition>

在RAM少于4GB的计算机上安装失败。

我该如何避免这种情况?

感谢您的帮助!

2 个答案:

答案 0 :(得分:10)

感谢Cosmin Pirvu的回答,我发现以下custom actions解决方案适合我,我想与您分享:

<Custom Action="PhysicalMemoryWarning" After="InstallInitialize" />
<CustomAction Id="PhysicalMemoryWarning" Script="vbscript">
  <![CDATA[
  If session.Property("PhysicalMemory") < 3500 Then
    MsgBox("For running $(var.ProductName), 4GB of physical memory are recommended.")
  End If
  ]]>
</CustomAction>

答案 1 :(得分:2)

Windows Installer不直接支持此功能。但是你可以使用一个简单的custom action。它可以是EXE,DLL,VBScript,JavaScript等。

相关问题