Thanks Blair. You said "You can put as many UpgradeCodes in the Upgrade table as you need." - does it mean it's possible to upgrade multiple products whose upgrade ID are different? Is there any code example showing how to do this? Thanks a lot!
________________________________ From: Blair <os...@live.com> To: General discussion for Windows Installer XML toolset. <wix-users@lists.sourceforge.net> Sent: Wednesday, August 26, 2009 5:33:40 PM Subject: Re: [WiX-users] Major Upgrade: How to do major upgrade for the currect product and a previous product? You can put as many UpgradeCodes in the Upgrade table as you need. You can also take a gun and shoot yourself in the foot. -----Original Message----- From: little.forest [mailto:little.for...@ymail.com] Sent: Wednesday, August 26, 2009 10:15 AM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] Major Upgrade: How to do major upgrade for the currect product and a previous product? Hello WiX experts, I'd put this question another way: when doing major upgrade, we MUST put ONE upgrade ID in the upgrade section, is this correct or not? It is impossible to put more than one upgrade ID in upgrade table, correct or not? Thanks in advance. Your response is very appreciated. ________________________________ From: little.forest <little.for...@ymail.com> To: General discussion for Windows Installer XML toolset. <wix-users@lists.sourceforge.net> Sent: Wednesday, August 26, 2009 12:11:30 AM Subject: Re: [WiX-users] Major Upgrade: How to do major upgrade for the currect product and a previous product? Thanks for your reply, Blair. I see what you mean - keep the upgrade code unchanged for one product. But I have a feeling that we can upgrade other products - as long as we add the upgrade codes in the upgrade table. That means we could have a few different upgrade entries in the upgrade table. Maybe I am wrong? Also, it's strange: When I did the testing, I did installed both 2.1 and 3.1, by the way. I defined two upgrade sections. One section defines the upgrade code which is used by both 3.1 and 3.2; another section defines the 2.1's upgrade code. But the result is, the 2.1 is uninstalled; while 3.1 is kept. I'm looking forward your answers. Many thanks, /Brian ________________________________ From: Blair <os...@live.com> To: General discussion for Windows Installer XML toolset. <wix-users@lists.sourceforge.net> Sent: Tuesday, August 25, 2009 4:45:12 PM Subject: Re: [WiX-users] Major Upgrade: How to do major upgrade for the currect product and a previous product? Normally it is considered Best Practice to keep the UpgradeCode the same for the entire life of a product (you don't change it between versions). This makes it easier to prevent reinstalling 2.x when 3.x is already installed. In your log when you upgrade, normally there will be two references to calling RemoveExistingProducts (1st is calling the already installed package, and the other is within the already installed package). What is of interest in your case will be found between the sections of log you posted. Line 637 is the RemoveExistingProducts call of interest. From there until it "returns" is where you need to look to determine why it "failed". By the way, it should return a "1" in the log (will be at some point after 972). Line 972 is the nested RemoveExistingProducts. The reason it was skipped is because REMOVE is a maintenance operation (3.1 is not removing any other versions, since it isn't being installed). -----Original Message----- From: little.forest [mailto:little.for...@ymail.com] Sent: Tuesday, August 25, 2009 4:06 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] Major Upgrade: How to do major upgrade for the currect product and a previous product? By the way, the version 3.1 and 3.2 have the same upgrade ID because they are 3.x products. The version 2.1 has a different upgrade ID because it's 2.x products. You can see the upgrade ID is different here: <Upgrade Id='0F8634B0-560B-4473-BBC3-46D885AC8E04'> <UpgradeVersion Property="OLDAPPFOUND" OnlyDetect='no' Minimum="0.0.0" IncludeMinimum="yes" Maximum="$(var.ProductVersion)" IncludeMaximum="no" /> <UpgradeVersion Property="NEWAPPFOUND" Minimum="$(var.ProductVersion)" IncludeMinimum="no" OnlyDetect="yes" /> </Upgrade> <Upgrade Id='1B28D0BC-EF1A-4FE2-9020-44F37CB8DBB8'> <UpgradeVersion Property="OLDPRODUCTFOUND" OnlyDetect='no' Minimum="1.0.0.0" IncludeMinimum="yes" Maximum="100.0.0.99999" IncludeMaximum="no" /> </Upgrade> <CustomAction Id="NewerVersionDetected" Error="There is a later version of this product installed."/> <InstallExecuteSequence> <RemoveExistingProducts After='InstallValidate' /> <Custom Action="NewerVersionDetected" After="FindRelatedProducts">NEWAPPFOUND</Custom> </InstallExecuteSequence> <InstallUISequence> <Custom Action="NewerVersionDetected" After="FindRelatedProducts">NEWAPPFOUND</Custom> </InstallUISequence> Thanks. ________________________________ From: little.forest <little.for...@ymail.com> To: General discussion for Windows Installer XML toolset. <wix-users@lists.sourceforge.net> Sent: Tuesday, August 25, 2009 4:03:09 PM Subject: Re: [WiX-users] Major Upgrade: How to do major upgrade for the currect product and a previous product? Hello WiX experts, Could you please have a look at my problem below? Basically, what I'd like to do is simple. Say, we have the product version 3..1 and 3.2. When install 3.2 on top of 3.1, the 3.1 needs to be removed firstly. By using Major Upgrade, it works. Now, we'd like to do one more thing: when install 3.2, not only uninstall 3.1, but also uninstall version 2.1 if it's found in the target machine. So I added one entry in the upgrade table. When I installed 3.2, the version 2.1 is uninstalled which is good. But 3.1 wasn't uninstalled anymore. What could be wrong? The code and log info is in the email below. Thanks in advance. ________________________________ From: little.forest <little.for...@ymail.com> To: General discussion for Windows Installer XML toolset. <wix-users@lists.sourceforge.net> Sent: Monday, August 24, 2009 6:24:30 PM Subject: Re: [WiX-users] Major Upgrade: How to do major upgrade for the currect product and a previous product? Hi Blair, Thanks for you reply. That's a good point. I'd like to clarify a couple of things: before I made the code change, the upgrade from 3.2 to 3.1 worked. What I'm trying to do is to add one more 'upgrade ability' - that means, besides upgrading 3.1, I'd like to also upgrade 2.1, for instance. But after I added that one more upgrade entry in the upgrade table, the upgrade from 2.1 to 3.2 works; but upgrade from 3.1 to 3.2 is NOT working. So I do the install again, and this time I made the log. What I did is, I installed 3.1, then installed 3.2. As expected, I got 2 entries in control panel's Add/Remove programs. They are 3.1 and 3..2, of course. I then looked the log, I didn't find the property OLDPRODUCTFOUND get set. I guess this is okay because I don't have 2.1 installed, right? I expected the 3..1 is removed - but it is not. The property OLDAPPFOUND associated with 3.1 products. Here are the logs: ~~~~~~~~~~~~~~~~~~ [Line 164[: MSI (c) (40:BC) [17:49:25:216]: PROPERTY CHANGE: Adding OLDAPPFOUND property. Its value is '{C3D7C200-D49E-4DA4-A5A0-A8D7CA13EABB}'. Action ended 17:49:25: FindRelatedProducts. Return value 1. .... [Line 1691]: Property(N): SecureCustomProperties = NETFRAMEWORK35;NEWAPPFOUND;OLDAPPFOUND Property(N): PackageCode = {C49F8AE5-84AD-4C26-B271-FA1507502322} .... [Line 3604]: Property(S): SecureCustomProperties = NETFRAMEWORK35;NEWAPPFOUND;OLDAPPFOUND;OLDPRODUCTFOUND Property(S): OLDAPPFOUND = {C3D7C200-D49E-4DA4-A5A0-A8D7CA13EABB} .... [Line 3748]: Property(C): SecureCustomProperties = NETFRAMEWORK35;NEWAPPFOUND;OLDAPPFOUND;OLDPRODUCTFOUND Property(C): OLDAPPFOUND = {C3D7C200-D49E-4DA4-A5A0-A8D7CA13EABB} .... [Line 637]: MSI (s) (20:60) [17:49:29:529]: Doing action: RemoveExistingProducts MSI (s) (20:60) [17:49:29:529]: Note: 1: 2205 2: 3: ActionText Action 17:49:29: RemoveExistingProducts. Removing applications Action start 17:49:29: RemoveExistingProducts. MSI (s) (20:60) [17:49:29:529]: Note: 1: 2205 2: 3: Error MSI (s) (20:60) [17:49:29:529]: Note: 1: 2228 2: 3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 22 MSI (s) (20:60) [17:49:29:529]: Note: 1: 2205 2: 3: Error MSI (s) (20:60) [17:49:29:529]: Note: 1: 2228 2: 3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 23 RemoveExistingProducts: Application: {C3D7C200-D49E-4DA4-A5A0-A8D7CA13EABB}, Command line: UPGRADINGPRODUCTCODE={1386062F-247A-4982-86F3-2B0B9AA5F76D} CLIENTUILEVEL=0 REMOVE=ALL MSI (s) (20:F8) [17:49:29:529]: Resetting cached policy values MSI (s) (20:F8) [17:49:29:529]: Machine policy value 'Debug' is 0 MSI (s) (20:F8) [17:49:29:529]: ******* RunEngine: ******* Product: {C3D7C200-D49E-4DA4-A5A0-A8D7CA13EABB} ******* Action: ******* CommandLine: ********** MSI (s) (20:F8) [17:49:29:529]: End dialog not enabled MSI (s) (20:F8) [17:49:29:529]: Original package ==> C:\WINDOWS\Installer\535e7f.msi MSI (s) (20:F8) [17:49:29:529]: Package we're running from ==> C:\WINDOWS\Installer\535e7f.msi MSI (s) (20:F8) [17:49:29:529]: APPCOMPAT: looking for appcompat database entry with ProductCode '{C3D7C200-D49E-4DA4-A5A0-A8D7CA13EABB}'. MSI (s) (20:F8) [17:49:29:529]: APPCOMPAT: no matching ProductCode found in database. MSI (s) (20:F8) [17:49:29:529]: Machine policy value 'DisablePatch' is 0 MSI (s) (20:F8) [17:49:29:529]: Machine policy value 'AllowLockdownPatch' is 0 MSI (s) (20:F8) [17:49:29:529]: Machine policy value 'DisableLUAPatching' is 0 MSI (s) (20:F8) [17:49:29:529]: Machine policy value 'DisableFlyWeightPatching' is 0 MSI (s) (20:F8) [17:49:29:529]: APPCOMPAT: looking for appcompat database entry with ProductCode '{C3D7C200-D49E-4DA4-A5A0-A8D7CA13EABB}'. MSI (s) (20:F8) [17:49:29:529]: APPCOMPAT: no matching ProductCode found in database. MSI (s) (20:F8) [17:49:29:529]: Transforms are not secure. MSI (s) (20:F8) [17:49:29:529]: Command Line: UPGRADINGPRODUCTCODE={1386062F-247A-4982-86F3-2B0B9AA5F76D} CLIENTUILEVEL=0 REMOVE=ALL MSI (s) (20:F8) [17:49:29:529]: PROPERTY CHANGE: Adding PackageCode property. Its value is '{C49F8AE5-84AD-4C26-B271-FA1507502322}'. MSI (s) (20:F8) [17:49:29:529]: Product Code passed to Engine.Initialize: '{C3D7C200-D49E-4DA4-A5A0-A8D7CA13EABB}' MSI (s) (20:F8) [17:49:29:529]: Product Code from property table before transforms: '{C3D7C200-D49E-4DA4-A5A0-A8D7CA13EABB}' MSI (s) (20:F8) [17:49:29:529]: Product Code from property table after transforms: '{C3D7C200-D49E-4DA4-A5A0-A8D7CA13EABB}' MSI (s) (20:F8) [17:49:29:529]: Product registered: entering maintenance mode MSI (s) (20:F8) [17:49:29:529]: PROPERTY CHANGE: Adding ProductState property. Its value is '5'. MSI (s) (20:F8) [17:49:29:529]: PROPERTY CHANGE: Adding ProductToBeRegistered property. Its value is '1'. MSI (s) (20:F8) [17:49:29:529]: Package name retrieved from configuration data: 'MyApp_12345.msi' MSI (s) (20:F8) [17:49:29:529]: Determined that existing product (either this product or the product being upgraded with a patch) is installed per-machine. MSI (s) (20:F8) [17:49:29:529]: Note: 1: 2205 2: 3: Error MSI (s) (20:F8) [17:49:29:529]: Note: 1: 2729 .... [Line 972]: MSI (s) (20:F8) [17:49:29:670]: Doing action: RemoveExistingProducts MSI (s) (20:F8) [17:49:29:670]: Note: 1: 2205 2: 3: ActionText Action 17:49:29: RemoveExistingProducts. Removing applications Action start 17:49:29: RemoveExistingProducts. MSI (s) (20:F8) [17:49:29:670]: Skipping RemoveExistingProducts action: current configuration is maintenance mode or an uninstall Action ended 17:49:29: RemoveExistingProducts. Return value 0. MSI (s) (20:F8) [17:49:29:670]: Doing action: InstallInitialize MSI (s) (20:F8) [17:49:29:670]: Note: 1: 2205 2: 3: ActionText Action 17:49:29: InstallInitialize. Action start 17:49:29: InstallInitialize. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ As you can see, the property OLDAPPFOUND is set in line 3604 and 3748, but why it is set two times? Anyways, the property OLDAPPFOUND is set because the installer did find the old product 3.1, I suppose? But from line 972, it says "Skipping RemoveExistingProducts action: current configuration is maintenance mode or an uninstall". So the question is why the RemoveExistingProducts action is skipped? It's not a maintenance mode or uninstall. It's an upgrade. I really appreciate if you can point me out the problem. Here is my code - I just post it again: <Upgrade Id='0F8634B0-560B-4473-BBC3-46D885AC8E04'> <UpgradeVersion Property="OLDAPPFOUND" OnlyDetect='no' Minimum="0.0.0" IncludeMinimum="yes" Maximum="$(var.ProductVersion)" IncludeMaximum="no" /> <UpgradeVersion Property="NEWAPPFOUND" Minimum="$(var.ProductVersion)" IncludeMinimum="no" OnlyDetect="yes" /> </Upgrade> <Upgrade Id='1B28D0BC-EF1A-4FE2-9020-44F37CB8DBB8'> <UpgradeVersion Property="OLDPRODUCTFOUND" OnlyDetect='no' Minimum="1.0.0.0" IncludeMinimum="yes" Maximum="100.0.0.99999" IncludeMaximum="no" /> </Upgrade> <CustomAction Id="NewerVersionDetected" Error="There is a later version of this product installed."/> <InstallExecuteSequence> <RemoveExistingProducts After='InstallValidate' /> <Custom Action="NewerVersionDetected" After="FindRelatedProducts">NEWAPPFOUND</Custom> </InstallExecuteSequence> <InstallUISequence> <Custom Action="NewerVersionDetected" After="FindRelatedProducts">NEWAPPFOUND</Custom> </InstallUISequence> Thanks. /Brian ________________________________ From: Blair <os...@live.com> To: General discussion for Windows Installer XML toolset. <wix-users@lists.sourceforge.net> Sent: Friday, August 21, 2009 4:30:51 PM Subject: Re: [WiX-users] Major Upgrade: How to do major upgrade for the currect product and a previous product? What does your verbose debug install log say? Was the OLDPRODUCTFOUND property ever set? -----Original Message----- From: little.forest [mailto:little.for...@ymail.com] Sent: Friday, August 21, 2009 3:52 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Major Upgrade: How to do major upgrade for the currect product and a previous product? Hi, We're using WiX version 3. We do Major Upgrade. It works fine. I mean, when installing a new version, the old version of the software is uninstalled first, then the new software is installed. "0F8634B0-560B-4473-BBC3-46D885AC8E04" is the upgrade code. Our new software version is 3.x.y series.. Let's say, when install 3.2.0 on top of 3.1.0, the 3.1.0 got uninstalled firstly. It works. Here is the code: <Upgrade Id='0F8634B0-560B-4473-BBC3-46D885AC8E04'> <UpgradeVersion Property="OLDAPPFOUND" OnlyDetect='no' Minimum="0.0.0" IncludeMinimum="yes" Maximum="$(var.ProductVersion)" IncludeMaximum="no" /> <UpgradeVersion Property="NEWAPPFOUND" Minimum="$(var.ProductVersion)" IncludeMinimum="no" OnlyDetect="yes" /> </Upgrade> <CustomAction Id="NewerVersionDetected" Error="There is a later version of this product installed."/> <InstallExecuteSequence> <RemoveExistingProducts After='InstallValidate' /> <Custom Action="NewerVersionDetected" After="FindRelatedProducts">NEWAPPFOUND</Custom> </InstallExecuteSequence> <InstallUISequence> <Custom Action="NewerVersionDetected" After="FindRelatedProducts">NEWAPPFOUND</Custom> </InstallUISequence> Now, we'd like do upgrade for an old product which has a different upgrade code, you know. Our old software version is 2.a.b series, let's say, something like 2.2.0. During installing of the 3.x.y software, we'd like to also uninstall 2.a.b software. To support this "uninstall old version of software", I thought I just need to add one more entry in upgrade table to include this old software's upgrade code. So I added this code: <Upgrade Id='1B28D0BC-EF1A-4FE2-9020-44F37CB8DBB8'> <UpgradeVersion Property="OLDPRODUCTFOUND" OnlyDetect='no' Minimum="1.0.0.0" IncludeMinimum="yes" Maximum="100.0.0.99999" IncludeMaximum="no" /> </Upgrade> The old proudct upgrade code is "1B28D0BC-EF1A-4FE2-9020-44F37CB8DBB8". So now, if I have both 2.2.0 and 3.1.0 installed, then when I install 3.2.0, I expected both 2.2.0 and 3.1.0 will be removed. But in reality, only the 2.2.0 is uninstalled, the version 3.1.0 is not installed. Then I got two instance of software 3.1.0 and 3.2.0. Also, in control panels, there are two entries. Why 3.1.0 isn't removed? How to fix this? Please point me out the problems. Many thanks!!! /Brian __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ---------------------------------------------------------------------------- -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ WiX-users mailing list wix-us...@lists.sourceforge..net https://lists.sourceforge.net/lists/listinfo/wix-users ---------------------------------------------------------------------------- -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding.. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ---------------------------------------------------------------------------- -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ________________________________ Looking for the perfect gift?Give the gift of Flickr! __________________________________________________________________ Connect with friends from any web browser - no download required. Try the new Yahoo! Canada Messenger for the Web BETA at http://ca.messenger.yahoo..com/webmessengerpromo.php ---------------------------------------------------------------------------- -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ---------------------------------------------------------------------------- -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users __________________________________________________________________ Looking for the perfect gift? Give the gift of Flickr! http://www.flickr.com/gift/ ---------------------------------------------------------------------------- -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users __________________________________________________________________ Looking for the perfect gift? Give the gift of Flickr! http://www.flickr.com/gift/ ---------------------------------------------------------------------------- -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users __________________________________________________________________ Connect with friends from any web browser - no download required. Try the new Yahoo! Canada Messenger for the Web BETA at http://ca.messenger.yahoo.com/webmessengerpromo.php ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users