Installation sequence restrictions for multi-package transactions

Installation sequence restrictions for multi-package transactions

  • Comments 3

Windows Installer 4.5 introduced a feature to install multiple packages in a single transaction. Multi-package transactions allow setup developers to install multiple packages as an atomic unit that are installed together, or rolled back completely. You can also apply patches to multiple products or even repair multiple products – any maintenance mode installation – within a single transaction. Installation scripts are not merged but executed in the order that packages are installed, and commit actions are deferred till the very end.

There is an installation sequence restriction, however: if you are installing both 32- and 64-bit packages – marked in the Template summary property of an MSI package – you must install the 64-bit packages first before the 32-bit packages.

Within a single transaction, if you install a 32-bit package and then a 64-bit package, any attempts to install files to 64-bit directories like ProgramFiles64Folder will be redirected as highlighted below.

    ******* Product: x86.msi

MSI (s) (3C:4C) [22:35:38:008]: Running installation inside multi-package transaction MultiMsi 

MSI (s) (3C:F4) [22:35:45:821]: Target path resolution complete. Dumping Directory table...
MSI (s) (3C:F4) [22:35:45:822]: Note: target paths subject to change (via custom actions or browsing)
MSI (s) (3C:F4) [22:35:45:831]: Dir (target): Key: TARGETDIR    , Object: C:\
MSI (s) (3C:F4) [22:35:45:831]: Dir (target): Key: ProgramFilesFolder    , Object: C:\Program Files (x86)\
MSI (s) (3C:F4) [22:35:45:841]: Dir (target): Key: ManufacturerDir    , Object: C:\Program Files (x86)\Heath Stewart\
MSI (s) (3C:F4) [22:35:45:849]: Dir (target): Key: INSTALLLOCATION    , Object: C:\Program Files (x86)\Heath Stewart\MultiMsi (x86)\ 

    ******* Product: x64.msi

MSI (s) (3C:4C) [22:35:48:404]: Running installation inside multi-package transaction MultiMsi 

MSI (s) (3C:38) [22:35:48:793]: WIN64DUALFOLDERS: 'C:\Program Files (x86)\' will substitute 17 characters in 'C:\Program Files\' folder path. (mask argument = 0, the folder pair's iSwapAttrib member = 0).
MSI (s) (3C:38) [22:35:48:793]: PROPERTY CHANGE: Modifying ProgramFiles64Folder property. Its current value is 'C:\Program Files\'. Its new value: 'C:\Program Files (x86)\'.


MSI (s) (3C:38) [22:35:48:797]: Target path resolution complete. Dumping Directory table...
MSI (s) (3C:38) [22:35:48:798]: Note: target paths subject to change (via custom actions or browsing)
MSI (s) (3C:38) [22:35:48:799]: Dir (target): Key: TARGETDIR    , Object: C:\
MSI (s) (3C:38) [22:35:48:799]: Dir (target): Key: ProgramFiles64Folder    , Object: C:\Program Files (x86)\
MSI (s) (3C:38) [22:35:48:800]: Dir (target): Key: ManufacturerDir    , Object: C:\Program Files (x86)\Heath Stewart\
MSI (s) (3C:38) [22:35:48:801]: Dir (target): Key: INSTALLLOCATION    , Object: C:\Program Files (x86)\Heath Stewart\MultiMsi (x64)\

You can see the Windows Installer is redirecting ProgramFiles64Folder to ProgramFilesFolder. Files intended for 64-bit locations end up in 32-bit locations. However, if you reverse the sequence of packages to install the 64-bit package first before the 32-bit package, the directories are resolved correctly as shown below.

    ******* Product: x64.msi

MSI (s) (F4:CC) [22:39:19:277]: Running installation inside multi-package transaction MultiMsi

MSI (s) (F4:70) [22:39:21:325]: Target path resolution complete. Dumping Directory table...
MSI (s) (F4:70) [22:39:21:353]: Note: target paths subject to change (via custom actions or browsing)
MSI (s) (F4:70) [22:39:21:361]: Dir (target): Key: TARGETDIR , Object: C:\
MSI (s) (F4:70) [22:39:21:375]: Dir (target): Key: ProgramFiles64Folder , Object: C:\Program Files\
MSI (s) (F4:70) [22:39:21:407]: Dir (target): Key: ManufacturerDir , Object: C:\Program Files\Heath Stewart\
MSI (s) (F4:70) [22:39:21:430]: Dir (target): Key: INSTALLLOCATION , Object: C:\Program Files\Heath Stewart\MultiMsi (x64)\ 

    ******* Product: x86.msi

MSI (s) (F4:CC) [22:39:25:502]: Running installation inside multi-package transaction MultiMsi

MSI (s) (F4:FC) [22:39:25:896]: Target path resolution complete. Dumping Directory table...
MSI (s) (F4:FC) [22:39:25:896]: Note: target paths subject to change (via custom actions or browsing)
MSI (s) (F4:FC) [22:39:25:897]: Dir (target): Key: TARGETDIR , Object: C:\
MSI (s) (F4:FC) [22:39:25:898]: Dir (target): Key: ProgramFilesFolder , Object: C:\Program Files (x86)\
MSI (s) (F4:FC) [22:39:25:898]: Dir (target): Key: ManufacturerDir , Object: C:\Program Files (x86)\Heath Stewart\
MSI (s) (F4:FC) [22:39:25:899]: Dir (target): Key: INSTALLLOCATION , Object: C:\Program Files (x86)\Heath Stewart\MultiMsi (x86)\

To install components into their right directories, you must install 64-bit packages first before 32-bit packages. If you have a functional requirement to install the 32-bit packages first you must do so in a separate transaction and simulate rollback yourself: you must uninstall packages from previous transactions.

Leave a Comment
  • Please add 7 and 6 and type the answer here:
  • Post
  • Heath, we have a 32-bit app that is installed on x86 and x64 systems using a 32-bit MSI installation.  We are developing a Windows Shell Extension and we need to install a 64-bit version of this shell extension on x64 systems.  I though I would be able to create an MSI just for the 64-bit shell extension and chain it from the 32-bit MSI application installer.  However, I ran into the issue you described here.  Is there any way to chain the x64 MSI from the x86 MSI?  Any suggestions?

    Thanks,

    Shane

  • @Shane, you said "chain it *from* the 32-bit MSI application installer". Do you mean you used a nested installation? Those have been deprecated for a long time because they cause all sorts of issues. If your application installer is something else that installs the 32- and 64-bit MSIs separately, be sure to install the 64-bit MSI first before the 32-bit MSI and you should be fine.

  • Running a 32 Bit then 64 Bit on Windows XP 64 seems to work OK in that components intended for the 64 bit locations are not redirected to 32 bit locations.  

    Server 2003 redist for Windows Installer 4.5 was used on XP 64 since a download specific to that OS/Architecture was not found.

Page 1 of 1 (3 items)