I have a shared dll, we’ll call it Utility.dll that is installed by multiple products. In my WIX file I install Utility.dll as a separate component. Now version 2.0 of the Utility.dll references an additional dll, UtilityUtility.dll which will need to be installed alongside.
For my first attempt integrating UtilityUtility.dll I created a new WIX component containing the new dll.
This causes problems in the following scenario
1) User installs Product 1 { Utility.dll 1.0 }
2) User installs Product 2 { Utility.dll 2.0, UtilityUtility.dll 2.0 }
3) User uninstalls Product 2 { Utility.dll 2.0 }
Now when a user uses the Utility.dll it will fail when it can’t find the referenced UtilityUtility.dll
This led me to add UtilityUtility.dll to the original component which prevents UtilityUtility.dll from being removed in the previous scenario but comes with its own issue.
1) User installs Product 1 { Utility.dll 1.0 }
2) User installs Product 2 { Utility.dll 2.0, UtilityUtility.dll 2.0 }
3) User uninstalls Product 2 { Utility.dll 2.0, UtilityUtility.dll 2.0 }
4) User uninstalls Product 1 { UtilityUtility.dll 2.0 }
UtilityUtility.dll is orphaned as it does not get removed by the Product 1 uninstall (it did not exist in the component when it was originally installed).
Do I have any other options here?
Thanks
Unless you can update Product 1 (which I presume isn't completely possible), I think you are screwed. IMHO, the Component Rules are the worst thing about the Windows Installer. This link to an old blog post of mine sums up most of it. Your case is a bit different than what is described there but the results are expected.
I think you get to pick the lesser of two evils.
I'm not 100% certain... but I think adding the second .DLL to the original component is likely a "violation" of the component rules. Take a look at: http://blogs.msdn.com/robmen/archive/2003/10/18/56497.aspx
From what I gather from the Wix crowd the leading "best practice" is to have each file as an individual component.
What are your plans for upgrades (in msi terms: major, minor, patch)? If I recall correctly minor upgrades are not allowed to muck with component definitions. No idea about patches.
You might also want to worry about repair.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With