WIX: How to detect if third-party application is installed? - wix

Is it any way in WIX to detect that a third-party application with a specified upgrade code is installed and what is it's installation folder? I can suggest a custom action is required, but what exactly to do in such custom action? Is it possible to detect such things in VBS custom action?

It really depends on the application. Most applications publish a registry key that can be used to detect them. In that case you just need a RegistrySearch element, no custom actions necessary. If the application was installed via MSI, sometimes a ComponentSearch is better.

You can use dotNetInstaller for configure it very well. With the help of registry search you can easily find out that the program is installed or not(Use product version / Product name for additional check)

Related

Configuring WIX project to remove control panel options

I am using Wix for create MSI packages.I have successfully created the project and its working fine. But i have challenge that I need to remove the Repair and Change functionality from my msi, means I need only the uninstall option for my msi. But currently I am unable to do so. I googled a lot and search every piece of tutorials, but didnt find any solution. Can anyone help me to Configuring WIX project to remove control panel options?
You can control these kind of functionality by using the ARP-properties of Windows Installer, where ARP stands for Add-or-Remove-Programs.
In your specific case set the ARPNOREPAIR- and ARPNOMODIFY-properties to 1. That should do the trick.

Custom installation in Wix Patch

In the wix major upgrade, I have a set of features and the end user has the option to install either typical, custom or complete features.
In case of wix patch release, is it possible to give the user the same option of typical, custom or complete installation type.
Else during the deployment can wix patch detect which features to be deployed based on the installation done in a system. i.e if a system is installed with typical installation then the wix patch update only those components that belong to typical installation. and if a system has a custom installation with only feature X then the patch update should update only those components that belong to feature X.
Thanks for help in advance.
No, it is not possible to let the user select the features again. That would be a MajorUpgrade with the msidbUpgradeAttributesMigrateFeatures attribute and showing the Custom Setup dialog.
In a Minor Upgrade / Patch the original feature installation states are remembered. If you need something wierd like an EXE/DLL is installed but during the patch uninstalled, you'd need to look at the concept of "puncturing" components using the msidbComponentAttributesTransitive attribute.

replace an application using wix

I maintain two flavors of an application. Only one should be installed on each machine.
Let's say that I got application A installed on a machine. Now the user wants to install application B. The installer should replace A and install B.
Is it possible to tell the windows installer via WIX to silently replace another application?
You can actually do this via the same mechanism that supports a major upgrade. Give each MSI a unique UpgradeCode. Then add an Upgrade element that detects the other MSIs UpgradeCode. Then add an UpgradeVersion element that will detect the other MSIs version correctly (could be the version number). You can use the Property attribute from the UpgradeVersion element to display special UI or otherwise condition stuff in your MSI to say, "Hey, I detected the other application".
I would suggest using the WiX bootstrapper functionality called Burn. You can create a bootstrapper (setup.exe) containing the logic for what packages need installed/removed.

Wix 3.6 bootstrapper to just launch msi

I am working with WIX 3.6, it has some great features to create managed bootstrapper application. I have managed to create a WPF ui for that. But, I dont want to create and handle all the events for the installer, our requirement is only to get an initial parameter like language selection from the user and proceed to the MSI. MSI already handles upgrade / uninstall and install checks.
Bootstrapper.Engine.Plan(LaunchAction.Install);
Is it possible to just launch the MSI without specifying the install / uninstall action codes?
Thanks!
Unfortunately, not today. The interface provided today is very powerful and you can control just about everything. That also means that you need to control a lot to get the core scenarios working. As we progress in the WiX toolset, we'll build up additional abstraction layers so that a custom BA is easier to write. The Burn functionality is still rather new and just needs time to have more code contributed.
If you want to look on the bright side, be glad that you'll be able to accomplish just about any required UI task because the interface provided is so expressive. :)

How specify a custom action to only run for upgrading from certain version in a windows installer?

Is there a way to check for the product version that windows installer is upgrading from, such that, a specified custom action only runs on upgrades from certain versions?
Thanks.
Yes you can create a file search that will check for a specific version and set a property you can use in your custom action condition. See http://wix.sourceforge.net/manual-wix3/check_the_version_number.htm for a nice guide.
You need to defined your upgrade rule, using a a custom public property, here are more details: How to implement WiX installer upgrade?
Then use this property to create the condition desired.