From: Wilson, P. <Phi...@wo...> - 2007-08-20 16:56:25
|
The issue with the upgrade failing shows here in the upgrade log:=20 =20 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. =20 The first product was installed per user, the upgrade is coming in as per-machine.=20 =20 ALLUSERS=3D2 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=3D2 by a non-administrator, resulting in a per-user install. = The upgrading install can have ALLUSERS=3D2 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=3D2 and = decide whether you want per-machine or per-user and set ALLUSERS accordingly.=20 =20 Phil Wilson=20 From: Matthew Sheets [mailto:ms...@pr...]=20 Sent: Monday, August 20, 2007 7:10 AM To: Bob Arnson; Wilson, Phil Cc: wix...@li... Subject: RE: [WiX-users] Performing both New Installs and Upgrades with a Common MSI =20 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=3D2 was incorporated in a similar fashion = in the WiX file. =20 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=3D2 and the upgrade also set ALLUSERS=3D2. The goal is to = install all Start Menu and Desktop items under "All Users" (not yet implemented); apart from that, ALLUSERS=3D2 doesn't have any other significance (at least that I know of) in this particular WiX file. =20 That ALLUSERS property change from "2" to "1" can also be seen in that attached log files. =20 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. =20 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=3D"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. =20 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 =20 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 =20 =20 Thank you, Matthew =20 ________________________________ From: Bob Arnson [mailto:bo...@jo...]=20 Sent: Friday, August 17, 2007 10:17 AM To: Wilson, Phil Cc: wix...@li...; Matthew Sheets Subject: Re: [WiX-users] Performing both New Installs and Upgrades with aCommon MSI =20 Wilson, Phil wrote:=20 I don't like ALLUSERS=3D2 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.=20 Agreed -- major upgrades shouldn't use ALLUSERS=3D2. For that matter, = most products shouldn't use ALLUSERS=3D2. I believe RemoveExistingProducts is best sequenced just after InstallInitialize for robustness.=20 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. --=20 sig://boB http://joyofsetup.com/ |