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

Major upgrade madness


8 replies to this topic

rboutilier

rboutilier
  • Members
  • 2 posts

Posted 06 May 2004 - 22:58

Greetings fellow Installites,

Like many of you out there, I'm currently having some difficulties getting a major upgrade to work correctly. I'm considering going into some more rewarding work (professional organ doner, etc.). Windows Installer seems to be exhibiting some mysterious behavior, and I'd be relieved if anyone out there can shed some light on any of it.

I'm performing a major upgrade of my product from version 4.0.2 to 4.0.3 by doing a full reinstall. I have the upgrade table entry set to uninstall the old setup before installing the new setup. On the surface, this seems to work fine. My old product is detected and uninstalled, and my new product is installed. I discovered, however, by examining a before and after snapshot of the file system that two of my components are not being installed along with the new version. The log file has this to say about one component:

Disallowing installation of component: {015A812C-9214-47A2-A742-FF594F9466A3} since the keyfile exists and the component is marked to never overwrite existing installations

I've run across this before with "never overwrite" components. Windows Installer removes the old version, but does not install the new one. Not sure why, but at least it's consistent.

The other component raises this error:

Disallowing installation of component: {84EEAB1C-2BBE-4208-87CE-14E76A56BA10} since the same component with higher versioned keyfile exists

This is completely false. The component in question consists of a single standard dll. The file has not changed since the last version. The copy in the 4.0.3 installer is identical to the version put on the system by the 4.0.2 installer (I've done a binary comparison). So... once again Windows Installer removes the existing component, but does not install it again with the new version.

Once I start my application, auto-repair kicks in and the two components are installed. I checked the Windows Event Log, and found two events:

Detection of product '{25D6B7F5-6591-4A1C-A687-7AEC0E4BAEA1}', feature 'Cam2Measure', component '{015A812C-9214-47A2-A742-FF594F9466A3}' failed. The resource 'C:\Documents and Settings\All Users\Application Data\FARO\Cam2 Measure\Settings\Default.xap' does not exist.

I understand this message. It makes sense. However, I also get this one:

Detection of product '{25D6B7F5-6591-4A1C-A687-7AEC0E4BAEA1}', feature 'Cam2Measure' failed during request for component '{9F269653-EDD5-411B-BB87-C561282840A1}'

This is a COM component, so I suppose it's possible that it isn't registered properly. I don't understand, though, why there isn't any reference to component {84EEAB1C-2BBE-4208-87CE-14E76A56BA10}, since it obviously got replaced. Don't all auto-repair actions get logged, or is that too logical?

I also found that some registry entries were being re-written as part of the auto-repair function. These entries, however, are not associated with any of the components referenced in the event log or the install log file.

So... can anyone tell me
1) Why Windows Installer thinks that two identical files are different versions?
2) Why components that are obviously being replaced are not appearing in the event log (or if there's any other way to tell what's going on during a self-repair)?
3) Why, in the case of a major upgrade, Windows Installer makes all its decisions BEFORE uninstalling the old product.

Sorry for the length of this message. Thanks in advance for any info/advice/drink recipes that will make me not care.



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 08 May 2004 - 21:37

1) what's your REINSTALLMODE? try emus instead of omus
2) don't know
3) I guess the decision is made suring costing, which happens before removeExistingProduct. Looks like a bug in MSI to me, and I suggest you cntact Microsoft (they may already be investigating other reports of the same problem)

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 19 May 2004 - 08:22

This sounds vaguely familiar. See this thread:
http://forum.install...?showtopic=7730

I think what you might try is different sequencing of the RemoveExistingProducts actions. Specifically trying to move it earlier in the sequence.

Edited by Glytzhkof, 19 May 2004 - 08:24.

Regards
-Stein Åsmul

Holger_G

Holger_G
  • Full Members
  • 155 posts

Posted 22 August 2007 - 11:35

QUOTE (Stefan Krueger @ 2004-05-08 21:37)
Looks like a bug in MSI to me

Hello Stefan.

Do you know if this is an MSI bug? which possibly still exists?

Thanks

Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 22 August 2007 - 22:31

1) Why Windows Installer thinks that two identical files are different versions?

Probably related to attributes of the component.

2) Why components that are obviously being replaced are not appearing in the event log (or if there's any other way to tell what's going on during a self-repair)?

For certain actions, component transformations are not logged. The most obvious example is a normal install, where the product name is logged ("Product X was installed") but not the individual components. Another example is "install at first use", I believe that features are logged in that case.
Note: WI also has policies for automated logging. The log appears in the temp folder of the active user. When nobody is logged on, check the temp folder of the system.

3) Why, in the case of a major upgrade, Windows Installer makes all its decisions BEFORE uninstalling the old product.

WI creates a single transaction of the removal and the install. This has the benefit that after an install failure or user cancellation, the system will be rolled back to the original state with the old software installed. Another benefit is that WI attempts to be smart, when a component is removed from the old install just to be replaced by an identical component of the new install, WI just leaves the old component as is.

To escape this behavior, move the RemoveExistingProducts action before InstallInitialize action. Indeed the upgrade will require more time, and after a failure/cancellation nothing is installed, but at least you know for sure that old product is completely removed first before moving on to the new product.
Note that I prefer this solution - it has never failed on me.

Holger_G

Holger_G
  • Full Members
  • 155 posts

Posted 23 August 2007 - 07:28

QUOTE (Zweitze @ 2007-08-22 22:31)
1) Why Windows Installer thinks that two identical files are different versions?

Probably related to attributes of the component.

In my case the (unversioned) files are identically. No changes were made to them. I used the same files for creating a simply new test project. Problem still occurs.

QUOTE
To escape this behavior, move the RemoveExistingProducts action before InstallInitialize action. Indeed the upgrade will require more time, and after a failure/cancellation nothing is installed, but at least you know for sure that old product is completely removed first before moving on to the new product.
Note that I prefer this solution - it has never failed on me.test

'RemoveExistingProducts' is sequenced between 'InstallValidate' and 'InstallInitialize'. After installing the Major Upgrade some of my component key files are missing. The log file reports (during CostFinalize):
Disallowing installation of component: {BCB1753C-38D3-40A4-9AD5-DA8F6D6F4571} since the same component with higher versioned keyfile exists
for those components.
For me it looks like that the file version compare in MSI is a little wacked.

To solve the problem I could use bogus files versions for those files in the File table or I could move the RemoveExistingProducts action to later in sequence. But I would really like to know what´s the real problem is. Some of these files are true type font files. But only a bunch of these files are involved.

-Nick



Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 23 August 2007 - 22:30

QUOTE
'RemoveExistingProducts' is sequenced between 'InstallValidate' and 'InstallInitialize'. After installing the Major Upgrade some of my component key files are missing. The log file reports (during CostFinalize):
Disallowing installation of component: {BCB1753C-38D3-40A4-9AD5-DA8F6D6F4571} since the same component with higher versioned keyfile exists
for those components.
For me it looks like that the file version compare in MSI is a little wacked.

I find the CostFinalize message odd - it looks like you're doing a minor upgrade, not a major upgrade. The easiest way to tell is to look whether the [Installed] property is present in the log (if it is, you're looking at a minor upgrade, and the position of RemoveExistingProducts has no influence at all). To ensure a major upgrade, change the [ProductCode].
If everything's OK I'd say that the Windows Installer database got corrupted somehow, try to reproduce this behavior on a clean system.

Another workaround is to change the ID of component BCB1753C-38D3-40A4-9AD5-DA8F6D6F4571 in the new version.


Holger_G

Holger_G
  • Full Members
  • 155 posts

Posted 24 August 2007 - 14:15

I´ve verified the .log file again and a Major Upgrade will be performed.
I can reproduce the problem on a clean XP SP2 system and a new project (IS2008) that only installs 2 components.

Holger_G

Holger_G
  • Full Members
  • 155 posts

Posted 27 August 2007 - 09:11

So it looks like that I have to sequence the RemoveExistingProducts Action after the InstallFinalize action to get rid of the problem?!