PDA

View Full Version : List of failed conditions



Ray_Portrait
06-20-2008, 09:05 AM
Our users are complaining that it is irritating to go through an install (which has many paths) only to get told that they need to install something and then the install aborts. They then install the required software and then get passed the part that fails and then get told to install something further to continue.

Due to the fact that the required inhouse software is large, we cant use prereq's (even though 2009 has feature prereqs now).

Is there a way to create a dialog, depending on which path is selected, that contains a list of criteria that is needed to be done before running the install again with success?

We are using Basic MSI, Installshield 2009

DLee65
06-20-2008, 10:38 AM
Yes ... We have done this in the past to list out all the prerequisites required to install an application. Basically you do your app search to find out the system meets all the criteria. After you construct a message to display in a dialog based on the properties that failed.

To do this first go to Behavior And Logic => System Search. Add the searches you desire and note the properties generated.

Next, create a custom action to construct your custom message based on which items are required. In my case I just constructed an InstallScript custom action that looks for MDAC28FOUND property, IE7FOUND property, DOTNETVERSION20SP1 property, and ADOBEREADER8FOLDER property. The solution is just a simple series of 'if / endif' statements that append a newline character and text to my variable szMsg. Sequence this custom action after the AppSearch in both the UI and Execute sequence.

If after all my checks szMsg is not a null string then I assign the value of szMsg to a new public property - lets call it [APP_REQUIREMENTS_NOT_MET]. I then create a new custom action type 19, which generates an error message and aborts the setup. Sequence this custom action after the InstallScript custom action you created above. Set the Error message Text to [APP_REQUIREMENTS_NOT_MET] and set the condition to execute also to APP_REQUIREMENTS_NOT_MET. Basically you only show this error message if the property exists - so make sure you do not define it in your property table, it should only be defined by a custom action.

Hopefully this helps.

DLee65
06-20-2008, 11:07 AM
I threw together a simple Basic MSI setup that illustrates this behavior.

See the attached ISM and .rul file. Note that they are zipped up using 7Zip, a free zip utility.

Also note in this sample I uploaded, I have not yet populated the string table with the text I would want to show.