[wix-users] Checking for Product A before installing Product B

Swatantra Yadav swatantra.yadav at skykick.com
Tue Apr 30 11:31:44 PDT 2019


Thanks Rob and Blair! These guidelines will be useful when I am working on the next version of product.

The issue of common files getting deleted has been fixed by changing the upgrade schedule from Schedule="afterInstallExecute" to "afterInstallInitialize". I noticed the files got deleted at the very end of install so scheduling RemoveExistingProducts at the InitializeInstall allows the common files to be removed first but then get added back as part of install of product b..

It does not look like there is a way to avoid Restart after upgrade?

Thanks,
Swatantra

-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Rob Mensching via wix-users
Sent: Monday, April 29, 2019 10:49 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Rob Mensching <rob at firegiant.com>
Subject: Re: [wix-users] Checking for Product A before installing Product B

You might find this interesting: http://robmensching.com/blog/posts/2003/10/18/component-rules-101/

_____________________________________________________________
 Short replies here. Complete answers over there: http://www.firegiant.com/

-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Blair Murri via wix-users
Sent: Monday, April 29, 2019 6:05 PM
To: Swatantra Yadav <swatantra.yadav at skykick.com>; WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Blair Murri <osito at live.com>
Subject: Re: [wix-users] Checking for Product A before installing Product B

The components containing shared resources must have the same component IDs. The best way to do that is to let WiX autogenerate the component IDs which IIRC forces you to have one file per component (if not it should in my not so humble opinion).

It's almost never recommended to ever let two files share a component.

Get Outlook for Android<https://aka.ms/ghei36>

________________________________
From: Swatantra Yadav <swatantra.yadav at skykick.com>
Sent: Monday, April 29, 2019 4:27:26 PM
To: WiX Toolset Users Mailing List; Blair Murri
Subject: RE: [wix-users] Checking for Product A before installing Product B

Just found another problem -

Common files such as Newtonsoft.Json.dll that should be present for both products are not present after Product B finishes uninstalling Product A, even though Product B also needs it. This does not happen for any dell that is unique to one of the products.

Can this be avoided if I separate each file in its own component? Currently I have all files in a single component.

Thanks,
Swat



-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Swatantra Yadav via wix-users
Sent: Monday, April 29, 2019 11:32 AM
To: Blair Murri <osito at live.com>; WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Swatantra Yadav <swatantra.yadav at skykick.com>
Subject: Re: [wix-users] Checking for Product A before installing Product B

Thanks Blair and others. This is working fine for me (Product A uninstalls Product B and vice versa using Upgrade element). I have a few more questions.


  1.  How can I avoid a machine restart? Both these products are shipped as Bootstrapper bundles (exe files) and not as Msi. So basically I am looking for equivalent of msiexec REBOOT=REALLYSUPPRESS  in Bundle > Chain > MsiPackage. Windows shows a machine restart is required dialog after Product B's installer removes Product A.
  2.  Can I remove the Bootstrapper instead of individual msi using Upgrade element? The bootstrappers have their own upgrade codes. When I put the UpgradeCode of Bootstrapper in Upgrade element it does not get removed.

Thanks,
Swatantra


From: Blair Murri <osito at live.com>
Sent: Friday, April 26, 2019 3:33 PM
To: Swatantra Yadav <swatantra.yadav at skykick.com>; WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Checking for Product A before installing Product B

Although the MajorUpgrade element implements a standard usage of the Upgrade element (along with some others) you can use both side by side if you follow a couple simple rules:
The MajorUpgrade element automatically used the UpgradeCode supplied to the Product element, so don't reuse that UpgradeCode with explicit Upgrade elements. Products sharing that UpgradeCode are already managed by the MajorUpgrade element.
Since the MajorUpgrade already schedules the RemoveExistingProducts action, don't explicitly author or schedule it. Any additional products you are removing with Upgrade elements will be removed along with the product(s) removed with the MajorUpgrade element.
Get Outlook for Android<https://aka.ms/ghei36>

________________________________
From: Swatantra Yadav <swatantra.yadav at skykick.com<mailto:swatantra.yadav at skykick.com>>
Sent: Friday, April 26, 2019 1:22:13 PM
To: WiX Toolset Users Mailing List
Cc: Blair Murri
Subject: RE: [wix-users] Checking for Product A before installing Product B

Is there a way I can use RemoveExistingProducts without removing the MajorUpgrade element?

While Upgrade code coupled with RemoveExistingProducts does work and removes Product B, I am having to remove the MajorUpgrade element from Product A installer.

If I don't remove the MajorUpgrade element I get the following error:
Duplicate symbol 'WixAction:InstallExecuteSequence/RemoveExistingProducts' found. This typically means that an Id is duplicated. Check to make sure all your identifiers of a given type (File, Component, Feature) are unique.

I cannot remove the MajorUpgrade element. The MajorUpgrade along with a consistent UpgradeCode and a newly generated Product ID enables Product A to do a silent update to itself which is important.

Thanks,
Swat


 -----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org<mailto:wix-users-bounces at lists.wixtoolset.org>> On Behalf Of Blair Murri via wix-users
Sent: Wednesday, April 24, 2019 7:28 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org<mailto:wix-users at lists.wixtoolset.org>>
Cc: Blair Murri <osito at live.com<mailto:osito at live.com>>
Subject: Re: [wix-users] Checking for Product A before installing Product B

You can also use Upgrade to find products by UpgradeCode and not remove them. Old-school, I know.

Get Outlook for Android<https://aka.ms/ghei36>

________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org<mailto:wix-users-bounces at lists.wixtoolset.org>> on behalf of Hoover, Jacob via wix-users <wix-users at lists.wixtoolset.org<mailto:wix-users at lists.wixtoolset.org>>
Sent: Wednesday, April 24, 2019 3:19:24 PM
To: WiX Toolset Users Mailing List
Cc: Hoover, Jacob
Subject: Re: [wix-users] Checking for Product A before installing Product B

All depends on if he wants to have the installer actually remove the other product (use Upgrade) or if he just wishes to detect it and block (then ProductSearch).

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Rob Mensching via wix-users
Sent: Wednesday, April 24, 2019 4:49 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org<mailto:wix-users at lists.wixtoolset.org>>
Cc: Rob Mensching <rob at firegiant.com<mailto:rob at firegiant.com>>
Subject: Re: [wix-users] Checking for Product A before installing Product B

And as Bob pointed out, ProductSearch (which I totally forgot about) is even easier.

_____________________________________________________________
 Short replies here. Complete answers over there: http://www.firegiant.com/

-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org<mailto:wix-users-bounces at lists.wixtoolset.org>> On Behalf Of Blair Murri via wix-users
Sent: Wednesday, April 24, 2019 2:05 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org<mailto:wix-users at lists.wixtoolset.org>>
Cc: Blair Murri <osito at live.com<mailto:osito at live.com>>
Subject: Re: [wix-users] Checking for Product A before installing Product B

Yes. Upgrade elements use the respective UpgradeCode values from each product.

Get Outlook for Android<https://aka.ms/ghei36>

________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org<mailto:wix-users-bounces at lists.wixtoolset.org>> on behalf of Swatantra Yadav via wix-users <wix-users at lists.wixtoolset.org<mailto:wix-users at lists.wixtoolset.org>>
Sent: Wednesday, April 24, 2019 1:27:03 PM
To: WiX Toolset Users Mailing List
Cc: Swatantra Yadav
Subject: Re: [wix-users] Checking for Product A before installing Product B

Thanks you sirs!  I see the disadvantage of using Component search so will avoid using it.

Will Upgrade element work in my scenario where Product A and Product B are two completely separate applications?


-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org<mailto:wix-users-bounces at lists.wixtoolset.org>> On Behalf Of Edwin Castro via wix-users
Sent: Tuesday, April 23, 2019 4:12 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org<mailto:wix-users at lists.wixtoolset.org>>
Cc: Edwin Castro <egcastr at gmail.com<mailto:egcastr at gmail.com>>
Subject: Re: [wix-users] Checking for Product A before installing Product B

Conditions and Feature selection could possibly result in Product A being installed but the Component not installed. Even if this is not possible today, it might become possible in the future and you (or a future
maintainer) will need to remember these things to ensure setup still works as required.

I'd also recommend using the Upgrade element to detect an installed product.


On Tue, Apr 23, 2019 at 3:11 PM Christopher Painter via wix-users < wix-users at lists.wixtoolset.org<mailto:wix-users at lists.wixtoolset.org>> wrote:

> Same here.  Even the way the question is worded suggests this.   You'd
> also be able to do things like check if a certain version range of a
> product is installed in a way that checking for a component wouldn't.   It
> would also tightly couple the check and have issues if that component 
> was ever removed from that product.
>
> There may also be other pitfalls of component searches that I don't 
> remember anymore.
>
> ________________________________
> From: wix-users
> <wix-users-bounces at lists.wixtoolset.org<mailto:wix-users-bounces at lists
> .wixtoolset.org>> on behalf of Rob Mensching via wix-users 
> <wix-users at lists.wixtoolset.org<mailto:wix-users at lists.wixtoolset.org>
> >
> Sent: Tuesday, April 23, 2019 4:13 PM
> To: WiX Toolset Users Mailing List
> Cc: Rob Mensching
> Subject: Re: [wix-users] Checking for Product A before installing 
> Product B
>
> I'd recommend using Upgrade element.
> _____________________________________________________________
>  Short replies here. Complete answers over there:
> https://nam05.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.f
> iregiant.com%2F&data=02%7C01%7Cswatantra.yadav%40skykick.com%7C48a
> 0fee3bbbd452509a708d6c8417cee%7C3f9cd7a0127a4ed4bf062f830d5616b7%7C0%7
> C0%7C636916580935386334&sdata=XwpKEquD1vH73MfmN95lneyKcVbO90M999xJ
> x%2Bsk5YA%3D&reserved=0
>
>
> -----Original Message-----
> From: wix-users
> <wix-users-bounces at lists.wixtoolset.org<mailto:wix-users-bounces at lists
> .wixtoolset.org>> On Behalf Of Swatantra Yadav via wix-users
> Sent: Tuesday, April 23, 2019 1:58 PM
> To: Jacques Eloff <repstosd at gmail.com<mailto:repstosd at gmail.com>>; WiX 
> Toolset Users Mailing List < 
> wix-users at lists.wixtoolset.org<mailto:wix-users at lists.wixtoolset.org>>
> Cc: Swatantra Yadav
> <swatantra.yadav at skykick.com<mailto:swatantra.yadav at skykick.com>>
> Subject: Re: [wix-users] Checking for Product A before installing 
> Product B
>
> The component is guaranteed to be in Product A. The code below is of 
> Product B. Since I generated the Guid it is not shared by any external 
> Product C.
>
> I initially wanted to use RegistrySearch to look for Product A install 
> but found out for some reason the registry key does not get removed 
> even if Product A has been uninstalled. So I am not using Registry 
> Search. The component is getting removed on uninstall. The file is 
> removed and I did not find the Guid in registry after uninstall so 
> ComponentSearch seems like better option for me I think as it will 
> correctly exist only if Product A is currently installed. But yes 
> given a choice it would be nice to use a RegistrySearch instead.
>
> Thanks
> Swat
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant 
> https://nam05.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.f
> iregiant.com%2F&data=02%7C01%7Cswatantra.yadav%40skykick.com%7C48a
> 0fee3bbbd452509a708d6c8417cee%7C3f9cd7a0127a4ed4bf062f830d5616b7%7C0%7
> C0%7C636916580935386334&sdata=XwpKEquD1vH73MfmN95lneyKcVbO90M999xJ
> x%2Bsk5YA%3D&reserved=0
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant 
> https://nam05.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.f
> iregiant.com%2F&data=02%7C01%7Cswatantra.yadav%40skykick.com%7C48a
> 0fee3bbbd452509a708d6c8417cee%7C3f9cd7a0127a4ed4bf062f830d5616b7%7C0%7
> C0%7C636916580935386334&sdata=XwpKEquD1vH73MfmN95lneyKcVbO90M999xJ
> x%2Bsk5YA%3D&reserved=0
>

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant https://nam05.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.firegiant.com%2F&data=02%7C01%7Cswatantra.yadav%40skykick.com%7C48a0fee3bbbd452509a708d6c8417cee%7C3f9cd7a0127a4ed4bf062f830d5616b7%7C0%7C0%7C636916580935386334&sdata=XwpKEquD1vH73MfmN95lneyKcVbO90M999xJx%2Bsk5YA%3D&reserved=0

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
NOTE: This email was received from an external source. Please use caution when opening links or attachments in the message.

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/



More information about the wix-users mailing list