One of our applications needs to register a COM control during installation. If a newer version of that control is already registered, we don’t want to overwrite it with the older. What are the Windows MSI install conditions I would user to control this? Or is there some other ‘best-practice’ method I’m not aware of?
Thanks
What you are missing here is merge-modules. Basicly you create a merge-module for your COMxx component. This gets recompiled with each new version 19, 20, 21, … of your component (but keeps its GUID). Both your applications “reference” this COMxx merge-module and ship its content to the user.
This way windows installer will make sure your dll is refcounted and upgraded only if needed, provided you maintain (increase) version info in your dll.
Edit: The merge-module also hard codes install path, which usually ends up somewhere in
C:\Program Files\Common Files\{My Company}\{My Component}, both applications ship it there.