I've written an MSI to perform a major upgrade of a previous MSI. I've
changed the product code and the upgrade code, but handled this in the
Upgrade table. All the evidence is that the upgrade is correctly attempted.
The problem is that some individual files do not get upgraded. In fact they
get removed. I've moved the RemoveExistingProducts call to immediately after
InstallValidate, which explains why disallowed files go missing altogether,
but it does not explain why the new files were disallowed in the first place.
I am using Windows Installer 2.0, like most of my customers.
The verbose log contains two interesting types of statement:
Type 1: MSI (c) (B8:EC) [14:56:41:147]:
Disallowing installation of
component: {9CA00D1B-5F25-46D9-AFAE-A5DC573BCF08}
since the
same component with
higher versioned keyfile exists and
Type 2: MSI (c) (B8:EC) [14:56:40:536]: Allowing
installation of
component:
{F128E592-48E2-4C1A-93C6-63749DBC5981} even though a modified unversioned
keyfile exists and file versioning rules would disable the
component In the case of the type 1 statement, the file is a font (.ttf) file that is
installed to a private directory (not Windows\Fonts). There is no version
info in the file, and the pre-existing file is older than the one in the new
MSI.
In the case of the type 2 statement, this is an MSDE .mdf database file. My
installer shuts down MSDE as part of its StopServices call. In most cases,
this results in all attached database files being stamped with the current
date and time, as they get detached. When that happens, the result is that
new mdf/ldf files do not get installed, and the log records a statement
similar to type 1 (
disallowing) above. Occasionally, shutting down MSDE does
not result in a date update, and the result is that files do get updated, and
the type 2 statement above is logged.
I’ve found this so perplexing that I have resorted to performing the upgrade
by having my bootstrapper “manually” remove the pre-existing version before
running my new installer.
Can anybody shed any light on these observations? Why do my font files get
disallowed, and what circumstances cause the type 2 log statements?