cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Creating a Custom ICE with InstallShield

Creating a Custom ICE with InstallShield

Summary

In addition to built-in validation tests, InstallShield also allows for custom ICE tests to be created and run. This article contains an example.

Synopsis

In addition to built-in validation tests, InstallShield also allows for custom ICE tests to be created and run. This article contains an example.

Discussion

In addition to the built-in validation tests provided by InstallShield, it is also possible to create custom ICE tests and run them against and installer. This article provides steps to create a simple ICE tests and use it for validation using InstallScript and InstallShield.
  1. Download the attached sample project.
  2. Build the attached sample project.
  3. Install the attached sample project. Note there is not uninstaller as the installer only function is to copy the completed .CUB file for use with validation.
The sample installer includes an InstallScript custom action, CustomICE, which includes the action code to be used for validation. By building the installer, the custom action is compiled to DLL format. Running the installer will serve to actually merge the InstallScript custom action DLL in to a basic template for a .CUB database. This .CUB database contains tables which designate which custom actions are to run in order to validate an installation. It can be viewed within Orca.
With the installed .CUB file, the sample project can now be validated using the custom validation. To do so:
  1. Open the Build menu
  2. Select Validate -> Browse for a New Validation Module
  3. Select the custom .CUB
After performing these steps, validation messages will appear depending on the test performed. For the purpose of this sample, the validation looks for any Script based custom actions. If an installer contains a script based custom action, a validation warning is thrown.

Additional Information

As MSI installers are databases, the basis of all validation tests will most often involve checking the actual database for specific patterns or entry types. Although this example can be used as is if the intent is to identify script based custom actions, a better usage of this example is to focus on how this installer creates the modified .CUB as well as how the actual CustomICE custom action compares database entries. Note also that LogMessage contains the logic necessary to send messages to the output window of InstallShield.
Was this article helpful? Yes No
No ratings
Version history
Last update:
‎Jul 18, 2018 07:39 PM
Updated by: