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]: IIS 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. IIS Installed?
  2. MDAC not too old?
  3. Prevent Downgrades of Your Product
  4. Windows 2000 or Greater?
  5. Z: Available?


Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006 & 2007 for the Windows SDK (Windows Installer) area.This external link was OK when tested at 25 Jun 2008Please email me any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Prev]: IIS Configuration[Next]: IIS Installed?


MAKEMSI© is (C)opyright Dennis Bareis 2003-2008 (All rights reserved).
Sunday July 06 2008 at 11:25am
Visit MAKEMSI's Home PageThis external link was OK when tested at 21 Jun 2008

HTML page dated Mon, 29 Jan 2007 00:11:11 GMT
Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006 & 2007 for the Windows SDK (Windows Installer) area.This external link was OK when tested at 25 Jun 2008