Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wix: Show conditional message box without cancel

Tags:

wix

is there some way to show a message box due to some condition but continue installation?

I would like to inform the user about the recommended amount of RAM if he has less.

If I use

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

the installation is unsuccessful on machines with less than 4GB of RAM.

How can I avoid this?

Thanks for your help!

like image 280
Jakob S. Avatar asked Nov 23 '11 08:11

Jakob S.


2 Answers

Thanks to Cosmin Pirvu's answer I found the following solution with custom actions to work for me, I want to share with you:

<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>
like image 136
Jakob S. Avatar answered Oct 27 '22 17:10

Jakob S.


Windows Installer doesn't offer direct support for this. But you can use a simple custom action. It can be an EXE, DLL, VBScript, JavaScript etc.

like image 27
rmrrm Avatar answered Oct 27 '22 16:10

rmrrm