The issue with the upgrade failing shows here in the upgrade log: 

 

Action start 9:23:46: FindRelatedProducts.

MSI (c) (78:98) [09:23:46:746]: FindRelatedProducts: current install is
per-user.  Related install for product
'{0CF15655-D694-4EF7-9EFB-CBAE6F1C4C55}' is per-machine.  Skipping...

Action ended 9:23:46: FindRelatedProducts. Return value 1.

 

The first product was installed per user, the upgrade is coming in as
per-machine. 

 

ALLUSERS=2 is not a real value. It means do a per-user install if the
installing user does not have administrator privilege otherwise do a
per-machine install.  In your case, the original install may have been
ALLUSERS=2 by a non-administrator, resulting in a per-user install. The
upgrading install can have ALLUSERS=2 also, but with administrator
privileges it becomes a per-machine install that won't upgrade the
per-user one. Better to get out of the business of ALLUSERS=2 and decide
whether you want per-machine or per-user and set ALLUSERS accordingly. 

 

Phil Wilson 

From: Matthew Sheets [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 20, 2007 7:10 AM
To: Bob Arnson; Wilson, Phil
Cc: wix-users@lists.sourceforge.net
Subject: RE: [WiX-users] Performing both New Installs and Upgrades with
a Common MSI

 

Thank you for the feedback.  Interesting observations on the ALLUSERS
property-it appears to hit on an issue.  The MSI will be executed under
an administrative account, but users in the Windows "Users" group will
need to be able to run the program once it is installed.  I did a "dark"
of an MSI generated by the Visual Studio 2005 setup project, and the
"InstallAllUsers" project property appeared to correlate to the ALLUSERS
MSI property.  Thus, ALLUSERS=2 was incorporated in a similar fashion in
the WiX file.

 

In reviewing MSI installer logs from previous install/upgrade attempts,
I had observed that somewhere along the line, ALLUSERS comes up with a
value of 1.  This, despite the fact that the initial install set
ALLUSERS=2 and the upgrade also set ALLUSERS=2.  The goal is to install
all Start Menu and Desktop items under "All Users" (not yet
implemented); apart from that, ALLUSERS=2 doesn't have any other
significance (at least that I know of) in this particular WiX file.

 

That ALLUSERS property change from "2" to "1" can also be seen in that
attached log files.

 

As a test, I commented out ALLUSERS-related elements in the WiX file.
Add or Remove Programs now contains only a single program entry (even
after performing upgrades), but properties such as ProgramMenuFolder and
DesktopFolder now point to that of the current user instead of "All
Users."  Nevertheless, this seems to be a step in the right direction.

 

I found a blog post at
http://www.rikware.com/WebLog/Oct122006_Experimenting+with+WiX.html
indicating an ALLUSERS value of 1 achieves the "All Users" folder
result; would it be appropriate to use "<Property
Id="ALLUSERS">1</Property>" instead of the "darked" Visual Studio value
of 2?  Testing using this value appears to achieve the desired results
for non-duplication of Add or Remove Program entries, use of All Users
folders, preservation of existing data during upgrades, and use of a
common MSI for both new installs and upgrades.

 

Here is a description of the attached files (all logs created with
option "/lvap")-

*       ManagedCASample.wxs - the WiX file with ALLUSERS property
elements commented out
*       WixAllUsersSetup.log - "clean" install, with ALLUSERS elements
included
*       WixAllUsersUpgrade.log - upgrade install, with ALLUSERS elements
included

 

I have more logs I could post, but I hit a "message too large" e-mail
rejection from SourceForge when attempting to also include the following
(if any of these might be useful, please let me know):

*       WixSetup.log - "clean" install, with ALLUSERS elements commented
out
*       WixUpgrade.log - upgrade install, with ALLUSERS elements
commented out
*       Wix1Setup.log - "clean" install, with ALLUSERS property set to 1
*       Wix1Upgrade.log - upgrade install, with ALLUSERS property set to
1

 

 

Thank you,

Matthew

 

________________________________

From: Bob Arnson [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 17, 2007 10:17 AM
To: Wilson, Phil
Cc: wix-users@lists.sourceforge.net; Matthew Sheets
Subject: Re: [WiX-users] Performing both New Installs and Upgrades with
aCommon MSI

 

Wilson, Phil wrote: 

I don't like ALLUSERS=2 because it's indeterminate depending on the user
privileges. A major upgrade won't upgrade unless the incoming product
matches the installed product's ALLUSERS value. 


Agreed -- major upgrades shouldn't use ALLUSERS=2. For that matter, most
products shouldn't use ALLUSERS=2.

I believe RemoveExistingProducts is best sequenced just after
InstallInitialize for robustness. 


I generally agree, though in this case it was specifically to prevent
the assets behind components from being removed if they don't have
explicit upgrade support.

Matthew, logging will indicate how MSI handled the upgrade and show if
there was an error or ALLUSERS mismatch.

-- 
sig://boB
http://joyofsetup.com/
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to