Geeks With Blogs
Adventures of a Setup Developer my musings about setups and other things in my life

Windows Installer's transitive bit is a really cool thing. It allows you to author your components in such a way that it would install if component's condition is true and uninstall if it is false even during upgrades. Well almost. Refer the documentation for more information. So this can be used to get rid of pesky components that you need to uninstall during a minor upgrade. Now we thought this stuff was really neat and applied it to all the components. We had our justifications that this setup will always be done by admins and will always be per machine. None of the components wrote anything off to HKEY_CURRENT_USER and we were pretty much safe in assuming that it would not be the case in the future either. So we turned on the transitive bit for all our components. The software behaved exceptionally well. The maintenance was driven via a external wrapper which always passed the REINSTALL parameter and hence everything worked very well.

This allowed our MSI to behave as a state machine. You could simply throw in a bunch of properties and set its state and it would just install the ones that are required. This basically solves the problem of setup types and you do not have to write custom actions to set the feature request states.

We had tested most of the scenarios on different operating systems and it seemed to function just fine. We had it going through the last round of validation when we got a call from one of the landscape administrators that the product had uninstalled itself. Windows Installer had triggered a repair after the application of a hotfix by one of the developers and had completely uninstalled the application. The reason being that the Windows Installer repair operation also re-evaluates the component conditions and decides that they should not exist on the machine. The problem rested in the fact that even though we did persist the properties to be retrieved later, but that was entirely upto the bootstrapper to do it as the bootstrapper was the single entity that would do all the MSI related maintenance activities. So when the MSI repair started, which of course is as good as a quick reinstall, it ran through the entire InstallExecuteSequence table and found that most of the components were not supposed to be on the machine and had them removed. The solution was fairly simple. We had to persist all the properties and its values in the registry and we had to author AppSearch entries for all the properties and do a sort of quick check for the settings and swap the values with the actual ones during such a repair operation.

So if you plan to use the MSI transitive bit for your components, be very careful. You have been warned.

Posted on Sunday, April 2, 2006 6:09 AM Setup | Back to top


Comments on this post: The transitive bit gotcha!

# re: The transitive bit gotcha!
Requesting Gravatar...
Hello ...

I did not understand the proposed solution. Could you please elaborate ?

Thx & regards,
Left by Houssam Hamdan on May 04, 2010 6:25 AM

Your comment:
 (will show your gravatar)


Copyright © Vagmi Mudumbai | Powered by: GeeksWithBlogs.net