I have a setup which chains 2 MSI files:
- Either an x86/x64 MSI file that installs my product.
- An x86 MSI file which deploys a third-party toolkit
I wanted the second MSI file to use the same install directory so MSI file 1 stores the user's selected directory in the registry which MSI file 2 then reads and uses as its target.
Fine and dandy - if I install MSI file 1 to C:\Test\
no problem - MSI file 2 picks this up and throws the tool kits into that folder.
When I install to C:\Program Files
however... then MSI file 2 gets a bit to clever and decides I must have meant C:\Program Files (x86)
and puts the tools in there - a bit messy.
It logs this when it does it:
Action start 16:53:59: AppSearch.
MSI (c) (2C:44) [16:53:59:521]: Note: 1: 2262 2: Signature 3: -2147287038
MSI (c) (2C:44) [16:53:59:521]: WIN64DUALFOLDERS: 'C:\Program Files (x86)\' will substitute 17 characters in 'C:\Program Files\Manufacturer\Product' folder path. (mask argument = 0, the folder pair's iSwapAttrib member = 0).
MSI (c) (2C:44) [16:53:59:521]: PROPERTY CHANGE: Adding INSTALLDIRECTORY property. Its value is 'C:\Program Files (x86)\Manufacturer\Product'.
Action ended 16:53:59: AppSearch. Return value 1.
I am hoping to avoid bloating my setup too much with an x64 version of MSI file 2 (it is in the region of 20 MB), so my question is:
Is there a way I can avoid/disable this behaviour and get my x86 MSI file to trust me and write to "Program Files", not "Program Files (x86)"?
No, it can't be disabled. MSI enforces its rule that a 32-bit package cannot write to 64-bit portions of the file system (and registry).