Launch Conditions |
When your install requires a particular environment (such as IIS) to be able to install and/or uninstall your product it is a good idea to generate a descriptive message to inform any user of these requirements rather than allow the install to continue and fail or worse still continue without detecting errors.
Windows Installer has native support for performing simple validations via its "LaunchCondition" table, the "AbortIf" command can use this table or it can sequence a validation after some custom action which is returning information. Use the "COMPANY_SUMMARY_SCHEMA" macro to specify the minimum version of Windows Installer support that will install your msi. You should look at the "conditions" section of this manual.
You should have a look at the "Sample Properties" section as some information is readily available (the "Privileged" property tells you if the if the user has administrator privileges and "ScreenX" and "ScreenY" give you the screens resolution).
Have a look at the "Version File Based Launch Conditions" section.
For more complex requirements you typically need to execute some custom action to obtain the information in a suitable format.
Some commands frequently used to with launch conditions validation:
Some examples of launch conditions: