OCX and DLL Unregister Problem - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

giovannip
Posts: 5
Joined: Fri Jul 02, 2010 9:12 pm

OCX and DLL Unregister Problem

Hi,

I am upgrading several files (Example: VB6 runtime and additional OCX/DLL controls). As the product was not MSI based, I am aware that there is manual/custom action implementation work to be done and it cannot be done automatically. Currently, the OCX/DLL controls (libraries) reside in the SystemFolder. Based on what I can deduce from MSI best practices, I should not install libraries into the SystemFolder. Therefore, here is my situation:

A client's PC may have several versions of a library depending on what version of our software they have installed.

Disregarding any and all version specific information, I'd like to:

1. Perform an unconditional uninstall of all these libraries (especially those currently in the SystemFolder folder).
2. Ensure that their registry entries are properly deleted.
3. Reset their shared reference count to 0 so that they are deleted the SharedDLL's registry key)
4. Delete the library files.
5. Install the newest version of the libraries as well as any additional MSM/MSI's into an MSI compliant folder(s) and register them.

This is to ensure a clean uninstall and ensure that Windows Vista and Windows 7 don't have invalid file/registrey references or cause UAC type warnings (or at least avoid as many as possible).

I am aware that some users have used a custom action of using RegSvr32.exe, but I was wondering if this was the right approach or is there a another method by which I can perform the same tasks
(without having to resort to RegSvr32.exe)? If RegSvr32 is the best way to accomplish this, are there any sample AIP's that exist to demonstrate this process in a clean/safe way?

Please remember that the legacy libraries may have different versions (6.6.0.18 or 6.0.0.0, etc.) so the technique must uninstall any and all existing versions and thus it cannot be version specific.

One of my current problems is that I must uninstall the Visual Basic 6.0 SP6 libraries, and reinstall them with the newer cumulative update for VB6 SP6 which provides many enhancements/bug fixes.


Giovanni
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: OCX and DLL Unregister Problem

Hi Giovanni,

If the old products have an uninstaller, you can try calling it through a custom action. If they don't, using RegSvr32 is a good approach. I'm afraid that we don't have a sample project for this. Also it's not a very clean or safe approach because the unregister process may fail. However, there isn't a better method.

You can try using searches to find the files. The search properties can then be used by the RegSvr32 custom actions. To launch regsvr32.exe you can try using an Exe with working Dir custom action.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”