Assuming I understand what you're trying to do with the downgrade, sequencing RemoveExistingProducts early in one of the documented places (such as after InstallInitialize and before any script actions) will accomplish a downgrade. That sequencing results in an uninstall of the existing product followed by an install of the incoming product. This will downgrade if your Upgrade table allows it. If you have files that are shared with other products they won't be uninstalled however.
Phil Wilson -----Original Message----- From: little.forest [mailto:little.for...@ymail.com] Sent: Tuesday, April 28, 2009 11:16 AM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] Major Upgrade: some files are randomly not installed Hi Phil, Thank you for your reply. I did try "RemoveExistingProducts after InstallInitialize". It didn't work. I mean, old product was removed, but some files were not installed - because of version things. What we need is really simple - we just need the "down-grade" working. We surely would like to increase the file version number for each release as long as down-grade working. The reason for that is, as what I posted in previous thread: some times we may put an "older but working" build in our provisioning server to urge the user to "Downgrade" the "current but not working" build. All we need is, this "down-grade" happens silently without any user involvement. The problem now is, say, we have two builds: Build1 and Build2. From Build1->Build2, it's okay. But from Build2->Build1, we'll get a broken build because the file versions. I know we can add a dialog box to stop the users doing this - ask them to uninstall the existing build and install another build. But we would not like the users to manually install/uninstall the builds. So our question is, if we do "Major Upgrade" and the existing build(in this case, it's Build2) is uninstalled entirely, then why bother doing file comparison? Why don't just install Build1 anyways in this case? Sure, the files in Build1 are not compatible with those in Build2. But all files in Build1 are compatible each other. If they can be installed just like a normal stand-alone installation, then things will be just fine. I'm just wondering why this is not supported. I agree with you, Version Lying is not a good idea. But I might guess the reason why they do this. Anyways, it's not that a big deal to know that down-grade isn't fully supported. The important thing is that we know this fact. We'll change our code accordingly. We'll either keep the file versions are the same all the time, or increase file versions but don't support down-grade anymore. Thanks again, /Brian ________________________________ From: "Wilson, Phil" <phil.wil...@wonderware.com> To: General discussion for Windows Installer XML toolset. <wix-users@lists.sourceforge.net> Sent: Monday, April 27, 2009 5:18:34 PM Subject: Re: [WiX-users] Major Upgrade: some files are randomly not installed Going back to the big picture here, if you have your RemoveExistingProducts towards the end of the upgrade then the upgrade will use file update rules to decide what to replace. The upgrade is on top of the existing files, so you need to increment file versions to get files updated. If you want your upgrade to always remove the old files then sequence RemoveExistingProducts early, such as immediately after InstallInitialize. Version lying is not a good idea, so WiX perhaps decided not to provide it. The issue is that the version of the file on disk will never match the version in the actual file, so the install is broken, and I don't believe you can predict what things like a repair will do in every situation. Phil Wilson __________________________________________________________________ Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now http://ca.toolbar.yahoo.com. ------------------------------------------------------------------------------ Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users