.NET Framework - msiexec behavior different on XP vs. Win2003

Asked By Hugh Williams on 07-May-07 12:46 PM
Short version:

When I run an MSI that's already installed on XP, it aborts with an error.

When I run the same MSI when it's already installed on Win2003 Server, it
gives me the maintenance dialog.

Is this by design?


Longer version:

There were a few differences in the MSI logs.

1. The lines listed below that have a "+" in front of them were in the
msiexec log on XP, but not on Win2003:

MSI (c) (74:40) [10:29:31:979]: Machine policy value 'DisableUserInstalls'
is 0
+MSI (c) (74:40) [10:29:32:026]: SOFTWARE RESTRICTION POLICY: Verifying
package --> 'C:\foo.msi' against software restriction policy
+MSI (c) (74:40) [10:29:32:026]: Note: 1: 2262 2: DigitalSignature
3: -2147287038
+MSI (c) (74:40) [10:29:32:026]: SOFTWARE RESTRICTION POLICY: C:\foo.msi is
not digitally signed
+MSI (c) (74:40) [10:29:32:026]: SOFTWARE RESTRICTION POLICY: C:\foo.msi is
permitted to run at the 'unrestricted' authorization level.
MSI (c) (74:40) [10:29:32:026]: Cloaking enabled.


2. The XP log does not pass the Product Code to Engine.Initialize:

WXP: MSI (c) (74:40) [10:29:32:042]: Product Code passed to
Engine.Initialize:           ''
2003: MSI (c) (EC:C8) [10:55:44:179]: Product Code passed to
Engine.Initialize:           '{247D7108-8C1F-4782-853A-D93E7A68F0BE}'


3. The XP log shows this:

MSI (c) (74:40) [10:29:32:042]: Adding new sources is allowed.
MSI (c) (74:40) [10:29:32:042]: PROPERTY CHANGE: Adding PackagecodeChanging
property. Its value is '1'.
Another version of this product is already installed.  Installation of this
version cannot continue.  To configure or remove the existing version of
this product, use Add/Remove Programs on the Control Panel.
{247D7108-8C1F-4782-853A-D93E7A68F0BE} // this is the product code

... but the W2003 log shows this:

MSI (c) (EC:C8) [10:55:44:179]: Adding new sources is allowed.
MSI (c) (EC:C8) [10:55:44:179]: Package name retrieved from configuration
data: 'Deposit Application Server.msi'
MSI (c) (EC:C8) [10:55:44:179]: Determined that existing product (either
this product or the product being upgraded with a patch) is installed
per-machine.




Stefan Krueger [MVP] replied on 08-May-07 09:56 AM
You need find out why the PackageCode is changing on XP. If the PackageCode
is unchanged when you launch the install a second time you enter maintenance
mode, if it's different you get the error. This is true for both operating
systems. So either the package you are launching on XP is not exactly the
same that you used the first time (PackageCode different) or some tool is
changing the package code on XP on the fly.

--
Stefan Krueger
Microsoft Windows Installer MVP

Please post your questions in the newsgroup or vist one of these web sites:

Windows Installer FAQ
http://www.msifaq.com - http://www.msifaq.de

InstallSite - Resources for Setup Developers
http://www.installsite.org
http://www.installsite.de (GERMAN)