Conditional installation of ActiveX components

M

Mike

I'm writing an application in VB.NET that uses various 3rd party
ActiveX components. My problem is that if I register these ActiveX
components (using COMSelfRegister) during the install and later
uninstall my application, the ActiveX components are removed -
breaking any other applications that still need them. If I don't
register the ActiveX components, and they are not already installed on
the computer, my application will not run.

The solution appears to be some sort of Custom Install step where I
determine somehow whether each component is installed, then install it
if it is not.

Does anyone have experience with a similar problem, or examples of how
to build a custom installation that can selectively install ActiveX
components?
 
D

David Guyer [MS]

The best solution is to use a Merge Module from the developer of the
components. That way, all the components have the same ComponentID to
Windows Installer, and they'll be ref-counted.

If that doesn't work, in your setup project you can do a Registry Search
for the path to the HKCR registration information. For your ActiveX
components, edit the Condition property so that it is something like
REGISTRYSEARCH1="" (it will only install if the search didn't find
anything, i.e. it isn't already installed).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top