ISWIX, LLC View Christopher Painter's profile on LinkedIn profile for Christopher Painter at Stack Overflow, Q&A for professional and enthusiast programmers

July 20, 2006

Short Comings of LaunchConditions

Aaron Stebner posted a blog where he mentions a problem involving the fact that LaunchConditions doesn't support ordering of conditions. I've experienced this in the past myself and here are a few suggestions in the WindowsInstaller team happens to be reading.

In the past I've created installs that had the following additional requirements:

1) Display more then 1 condition at a time
2) Control the ordering of the conditions
3) Have the dialog be more `MSI` like ( ie not MessageBox )
4) Differentiate between Warnings and Errors

So I created a custom MSI table which is similar to the LaunchConditions table except that it has an Order column and a Required column. Then I wrote a CustomAction that processed the data and created an custom error property and a custom warning property. Finally I created a dialog that displayed the properties and either had a Exit button or a Next button depending on which property had data. I packaged this all into a merge module and reuse it with my various projects.

A future version of WindowsInstaller could easily implement this pattern by extending the schema of the LaunchConditions table and LaunchCondition standard action. A new dialog could be defined just like they did with the reboot mananger. The standard action could revert to the old behavior if the table doesn't have the new columns.

Then I could get back to authoring data relationships insted of writing custom actions.

3 comments:

Anonymous said...

Nice

-Colby

Anonymous said...

Cool! Do you have any code to share with us or do I have to start from scratch?
Tony

Christopher Painter said...

I'm afraid that I no longer have access to the code that I previously authored.

Maybe one day I'll recreate it and offer it up on InstallSite as a merge module for easy inclusion in installs. The real problem is the UI portion. I can author dialogs to service the pattern but they would look like InstallShield dialogs and would require customization to match other installers look and feel. This is why I was hoping that Microsoft would standardize the pattern so companies would preauthor the dialog just like you would with the FilesInUse dialog.