If you follow the world of the Windows Installer at all, I'm sure you have noticed that the Windows Installer 4.5 Beta was made available last week. Navigating the Connect sign up process is incredibly onerous but necessary if you want to get a hold of the new MSI.CHM and see the feedback provided thus far.
If you follow the WiX toolset then you might be wondering what our plans are for supporting MSI 4.5. Well, last Thursday I read through the new features. There were three new bit flags and two new tables that would need coverage in the WiX toolset. Since adding new bit flags is usually quite easy, I whipped out the changes for the three new bit flags in both WiX v2 and WiX v3 that night.
Of course, nothing is that simple and I ran into two problems:
- The new msidbCustomActionTypePatchUninstall value is 0x8000 (32768). Unfortunately, that value goes into the CustomAction.Type column that is defined as an Integer (i2). The Integer column in MSI only supports values from -32767 to 32767. So I would need to bump up the Type column to a DoubleInteger (i4). Unfortunately, if I did that then the new versions of the WiX toolset would not be able to patch previously created MSI files (because you can't transform column types in MSI). Does anybody else find it ironic that a bit flag added to enable more patching scenarios actually makes it impossible to patch older MSI files?
- The Windows Installer 4.5 Beta did not ship a new .cub file that understands the new bit flags. Thus, when you build an MSI using WiX v3 (that automatically validates your MSI files after link) that has one of these new bit flags you will always have an ICE45 error. Fortunately, we can suppress ICE45 in WiX v3 by added "-sice:ICE45" to the light.exe command-line.
After thinking about these problems for a couple days, I decided to back out my changes to WiX v2. I decided to back out the changes because WiX v2 is supposed to be our stable branch and adding support for a Beta release of the Windows Installer seems to go against that goal. I'll add full support to WiX v2 when MSI 4.5 releases.
I also chose not completely support msidbCustomActionTypePatchUninstall in WiX v3 yet. WiX v3 has the new attribute (CustomAction/@PatchUninstall='yes/no') for the new bit flag but if you use it your MSI will fail to link because the CustomAction.Type column definition is still Integer (i2) and 0x8000 won't fit. This is a big problem for authoring tools and developers so I expect the Windows Installer team is going to have to come up with a different solution (like add a new column on the end of the CustomAction table called TypeEx <grin/>).
That just left the new MsiEmbeddedUI and MsiEmbeddedChainer tables for the core WiX toolset to support all of the MSI 4.5 Beta features. So I sat down today, busted out the changes to WiX v3 to support the new tables, got Bob to review the changes and checked all of the changes in. You can see support for the MSI 4.5 Beta in CVS right now. We'll have a build tomorrow so people can start playing with the new features, if they so choose.
So that's the plan. When MSI 4.5 releases (early next year, I hear) WiX v2 will be enhanced to support the new features. WiX v3, on the other hand, has support for the new MSI 4.5 features about 10 days after the Beta was released. We'll keep updating WiX v3 as more details are made available by the Windows Installer team.