Search code examples
wixwix3.7

Wix pre-installation requirments


I am writing an installer to my application using wix3.8.

Before installing I need to check some machine requirements, and if the current machine does not have those requirements don't install my application.

The requirements are: 1. OS- win 8.1 and up. 2. CPU- HSW GT2 and up.

How do I add a check for these requirements in wix? Can anyone help me please?


Solution

  • I think you will need to write a customaction to check for CPU but for OS you can do a check like this

    <Condition Message="This application is only supported on Windows 8.1, or higher.">
        <![CDATA[Installed OR (VersionNT >= 603)]]>
    </Condition>
    

    Reference: How To: Block Installation Based on OS Version

    To develop a custom action you can refer to the following articles. Basically you need to create function that does all the checks you want and expose it in your custom action library. Then you can call this function from your installer script.

    Reference: