MAKEMSI quickly and reliably creates MSI files in a non-programmatic way
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
[Bottom][Contents][Prev]: IIS Configuration[Next]: .NET Framework Installed?
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
\->Tips and Tricks->Launch Conditions

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:

  1. AbortIf
  2. ComponentFind
  3. FileFind
  4. ProductFind
  5. RegistryRead

  6. The "VbsCa" or perhaps "DllCa-C" commands can be used to create custom actions which may simply return information for evaluation (see "AbortIf") or directly make the decision to abort the install.

Some examples of launch conditions:

  1. .NET Framework Installed?
  2. IIS Installed?
  3. MDAC not too old?
  4. Prevent Downgrades of Your Product
  5. Windows 2000 or Greater?
  6. Z: Available?


Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.Please email me any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Prev]: IIS Configuration[Next]: .NET Framework Installed?


MAKEMSI© is (C)opyright Dennis Bareis 2003-2008 (All rights reserved).
Saturday May 28 2022 at 3:11pm
Visit MAKEMSI's Home Page
Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.