Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Moving Reg Keys between components


2 replies to this topic

jerry.ferentinos

jerry.ferentinos
  • Members
  • 2 posts

Posted 22 December 2005 - 18:05

We're using COM classes implementing specific categories as plug-ins into our application. A previous installer included a site-specific COM class in a DLL that was meant to be general purpose. This implies that the Windows Installer component associated with the registry entries for this COM class is the one associated with the general purpose DLL.

We've since corrected the issue and moved the COM object to a site-specific DLL whose component only gets installed when the site-specific feature is selected. The problem arises when we try to remove the keys associated with the site-specific COM class from installations that don't require it.

We've placed entries in the RemoveRegistry table in order to remove the keys and all subkeys of the object to no avail. All that gets removed is the default key for the CLSID of the COM class, all the subkeys remain, including the Implemented Categories, and the InprocServer32.

Needless to say that these keys cause problems when the application enumerates the COM classes implementing a category since the registered DLL no longer provides those classes.

My question then is how do I permanently remove these keys from installations in Minor upgrade scenario?

Thanks in advance for any help.
Regards,
Jerry

Edited by jerry.ferentinos, 22 December 2005 - 18:28.


Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 23 December 2005 - 16:13

Sorry, but the above was somewhat confusing. I beleive that in this specific case you will probably be best served by writing a custom action that cleans out the specific com data. A VBScript should be able to do this quite easily. Remember to not use WScript.CreateObject inside an MSI package (won't run), instead use: Set objShell = CreateObject("WScript.Shell")
Regards
-Stein Åsmul

jerry.ferentinos

jerry.ferentinos
  • Members
  • 2 posts

Posted 23 December 2005 - 16:59

Sorry. I tried to make it as complete as possible and in so doing ended up confusing matters. Here goes a second try:

A previous version of the installer installed a DLL that contained some COM classes. Two of these classes were later split out into their own DLL that should only be installed in certain cases.

A subsequent installer contained RemoveRegistry entries to remove the registration information for those two classes and these entries were associated with the original DLL component. In other words it would try and remove the registration for the two classes for all installs and then re-add the registration for installs including the new DLL.

A patch was created between the first version of the installer and the second but the problem is that some of the registry keys remain behind and we can't get them removed. You mentioned a VBScript, how would I proceed using this method?

Regards,
Jerry

Edited by jerry.ferentinos, 23 December 2005 - 20:51.