Good day,
TLDR: I am trying to create a MergeModule with files that have the SharedLegacyFile parameter set. This is something that I can do from within VIsualStudio using the MSI/MSI Installer Extensions provided by Microsoft. That flag (SharedLegacyFile) sets the msidbComponentAttributesSharedDllRefCount component flag (https://msdn.microsoft.com/en-us/librar ... s.85).aspx) for the file(s) that have it set. I can not find any option in AdvancedInstaller to achieve the same result. Am I missing something?
What I am trying to achieve, design wise, is a MergeModule that only uninstalls after all of it's 'parents' have been uninstalled, regardless of version.
For example (with Advanced Installer):
- Create a Merge Module Test.MSM includes a C:\Program Files\Common Files\Test\Test.exe app and set it's version parameter/field 1.0.
- Build Product_1v1.0.msi that includes the above Test.MSM;
- Build Product_2v1.0.msi that includes the above Test.MSM;
- Install Product_1v1.0.msi and the file shows up in the proper location (C:\Program Files\Common Files\Test\Test.exe) and I can check it's properties to see it is v1.0;
- Install Product_2v1.0.msi and the file is still in the proper location (C:\Program Files\Common Files\Test\Test.exe) and I can check it's properties to see it is still v1.0;
- I create an update of the Test.MSM Merge Module to contain a fix for the Test.exe app (App version is now 1.1) and set theversion parameter/field is now to v1.1 for this new Test.MSM;
- I then build Product_2v1.1,msi with this new version of the MSM;
- Install (either uninstall/install or upgrade) Product_2v1.1.msi the Merge Module Test.exe file is still in the proper location (C:\Program Files\Common Files\Test\Test.exe) and I can check it's properties to see the version of Test.exe has changed to v1.1 as I expect;
- Unexpeced Behaviour: If i uninstall either Product_1v1.0 or Product_2v1.1 the Merge Module component is removed (Test.exe no longer exists (C:\Program Files\Common Files\Test\Test.exe);
- Expeced Behaviour: If I do this same process with the msidbComponentAttributesSharedDllRefCount set on Test.exe (I open the MSM with Orca, find Test.exe in the Component table and set it's attribute from 256 to 264 (setting the 0000 1000 bit) for each of the MSM files), repeat the above steps and then uninstall either Product_1v1.0 or Product_2v1.1 the Merge Module component remains until the last 'parent' is removed (ie: both Product_1v1.0 and Product_2v1.1 need to be uninstalled);
Is there a way to do this in AdvancedInstaller or do I have to revert to using the Visual Studio MSI/MSM Installer extension to build this (Test.MSM) Merge Module?