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

IS 9 Basic MSI registry question


1 reply to this topic

LouWho

LouWho
  • Members
  • 4 posts

Posted 20 September 2006 - 17:48

In the upgrade version of the product, we moved RemoveExistingProducts to after Installfinalize because if the update failed, the previous install was gone and the user was without the product.

The problem is that in the old code the dll's were not marked as shared, and, we are installing to a different folder now. So the registry entries are being removed, and thus the service that we are installing will not start.

WriteRegistryValues must be run before the InstallFinalize since it is an action that updates the system, thus we cannot move it to after RemoveExistingProducts, (where we have it now). We are trying to find a way of doing this without having to regsvr32 each dll in a custom action after the old code RemoveExistingProducts(as this would have to be maintained for changes and deletions in the future). Any ideas?

Thanks

Lou

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 21 September 2006 - 05:39

First of all: if you change the absolute path of a component, change the component GUID. This also goes the other way: never point to the same path with two different GUIDs. This is THE CORE of MSI based reference counting. A 1-to-1 mapping between absolute path and component GUID. The type of upgrade problem you are experiencing is almost exclusively caused by this type of erronous component referencing.

You could bite the bullet and stop all existing services in a custom action in your new setup. Then install to a new disk loation AND change the paths in the registry as well. For example:

HKLM\Software\MyCompany\MyApp\4
to
HKLM\Software\MyCompany\MyApp\5

If you do this the registry items of the new install will be left alone, and the old package will install its own entries. You might also want to copy the entries from 4 to 5.

There are also other solutions, but just want to throw that one out first.
Regards
-Stein Åsmul