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

Swatantra Yadav swatantra.yadav at skykick.com
Tue Apr 23 13:58:16 PDT 2019


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


From: Jacques Eloff <repstosd at gmail.com>
Sent: Tuesday, April 23, 2019 1:44 PM
To: 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

Is the component guaranteed to always be in product B? Is it possible that the component can be shared, e.g. with Product C, so B might not be installed, but the component might? If that's the case you might consider a ProductSearch or using something like a registry key if Product B writes something that identifies itself.

Jacques

On Tue, Apr 23, 2019 at 12:34 PM Swatantra Yadav via wix-users <wix-users at lists.wixtoolset.org<mailto:wix-users at lists.wixtoolset.org>> wrote:
Hello All,

I have a requirement to install Product B only if Product A is not installed. Otherwise Product B installation should error. Does the below check look correct? I am checking for existence of a component that would be present if Product A is already installed. The check must only run at installation and not run on uninstall or update.

Thanks,
Swat



Installer of Product B:

<Product>
<Property Id="MyProperty">
      <ComponentSearch Id="ProductAAlreadyInstalled" Guid="{GUID HERE}" Type="directory">
      </ComponentSearch>
    </Property>
    <Condition Message="Please uninstall Product A before installing Product B">  <![CDATA[Installed AND NOT MyProperty]]> </Condition>


<!-Other things truncated here -->
</Product>


____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/<https://nam05.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.firegiant.com%2F&data=02%7C01%7Cswatantra.yadav%40skykick.com%7C8da7e5ec3fbe4aeac79908d6c82c70ab%7C3f9cd7a0127a4ed4bf062f830d5616b7%7C0%7C1%7C636916490561631564&sdata=r2GVSIDc%2FASMiatcqcq0IC%2FkDbrKbmE89j%2B7qVyD90s%3D&reserved=0>


More information about the wix-users mailing list