We have moved from InstallShield LE 2010 to WiX.
Our new WiX installer is able to uninstall previous WiX msi packages, but it does not detect the previous version of our software installed from the IS msi.
What steps should we take to make our WiX msi installer to detect the previous IS installations and uninstall them automatically?
In theory you will just need to make sure that the UpgradeCode on your product tag in wix is the same as the one in your InstallShield installer and the version number is greater in the wix project.
How you get that out of your InstallShield project that I don't know as I've never used InstallShield.
This helped me to grab the ProductCode and UpgradeCode from the old installer.
How to find the upgrade code & productCode of an installed application in Win 7
Although I am finding that InstallShield creates its own registry uninstall information along with Windows Installer information. When you uninstall something using Windows Installer (MSIEXEC) that was installed by InstallShield installer, it only wipes the Windows Installer registry nodes keeping InstallShield nodes intact. This makes the product show up in the Add/Remove Programs (Programs and Features) even though Windows Installer successfully uninstalls it.
Related
I have an msi bundled with prerequisites using Wix bootstrapper (burn.exe).
We migrated this project from Installshield to WiX.
The installation works fine.
However, during repair or uninstall the bootstrapper runs the msi-file in silent mode.
Since the last dialog (e.g. 'SetupCompleteSuccess') within the msi file contains some controls to trigger some more actions.
Is there a possibility to configure the bootstrapper so that the msi file is executed in 'UI'-mode?
In WiX v3, it is not possible. Burn explicitly shows internal UI only during initial install. WiX v4 changes how that works: https://github.com/wixtoolset/issues/issues/5616
I'm using WIX to create a new installer for an existing product. The installer is very simple - just drops a few dll's into a specified folder on disk.
In the field, my users already have that folder with old dll's in them (since they installed the old MSI - created using a *.vdproj project in VS).
My problem is that after I install the WIX, I have both the old MSI and the new Wix MSI appear in Add/Remove. Expected (? since these 2 are two different kind of MSI's?). I need some kind of an upgrade mechanism - so I was wondering if I can call the old MSI uninstaller from within the WIX one. Or alternately somehow take care of the old Add/Remove entry (a registry hack perhaps?)
Assuming the old install and the new install are installed using the same context ( per-user -> per-user or per-machine -> per-machine ) you can use a MajorUpgrade rule to find the old version and get rid of it. You can do this by syncing up the UpgradeCode property and using a higher ProductVersion or you can do it by authoring a second Upgrade rule using the legacy UpgradeCode GUID.
If the old install was per-user and you want the new install to be per-machine you are out of luck. This isn't supported by MSI. Typically I only support per-machine installs and hardcode the ALLUSERS property and remove the CustomerInformation dialog from the installer UI experience. This is not the default experience for VDPROJ based installers.
I have an wix bootstrapper that installs multiple msi's via chaining. One for the main app and others for plugins for the main application. The plugins version separately and their MSI could be upgraded during an autoupdate routine. The problem I have is that the uninstall on the bundle wont uninstall the MSIs for the plugins once they have been upgraded. Is it possible to set it up so that uninstalling the bootstrapper will uninstall the plugins regardless if they were upgraded?
For reference, I am always doing a major upgrade on each MSI.
Once a chained MSI is upgraded outside of the control of the WIX bootstrapper, un-installing the WIX bootstrapper will leave the upgraded MSI behind. This is by design. See the answer to How Wix bootstrapper uninstall msi package that has been upgraded for a more detailed explanation.
I have a custom installer based on WiX technology which is install several .vsix packages into Visual Studio.
If this packages are already installed, the installer offers to remove them. After the removal process is completed, the installer exits.
It's normal behaviour, but I need to offer the user re-install this packages (optionally) before exit. I mean optional mode to uninstall the previous version and install the new one (or the same) with a single run of the installer.
How to implement this in WiX ?
I suspect your custom installer could be made a little smarter. There are plenty of APIs (such as MsiQueryProductState) that will tell you if that exact ProductCode is installed, and ways to get the version (MsiGetProductInfo). My guess is that your custom installer is just firing off all the MSI installs without checking if they are already installed, hence the Remove prompts.
Your general plan should be to have some data available to your custom installer that it can use to find out what's already installed and what the versions are, and then compare these with what you are about to install. Use those APIs. If the product is already installed then skip the install. If you have a newer version (that you built with the WiX MajorUpgrade element) then just install it because it will replace the existing older one.
There's nothing I can think of in WiX that would automatically reinstall a product that your custom installer caused removal of by re-installing it and prompting the user to remove it, if that's what's going on.
I have created a Wix Burn app that I am installing two MSI's with. Works great.
The MSI files install properly
The Wix Burn app registers with ARP.
The MSI files do not register with ARP
I can do Major Upgrades
I can install and uninstall manually with a local copy of the Wix Burn app
I can programmatically execute the Wix Burn app to uninstall (using /x)
The Problem:
I know two way to uninstall using a Wix Burn app:
Click on the Uninstall button in ARP (requires user involvement)
Launch a copy of the Wix Burn app that installed the product
I see in the Wix Burn log that Windows caches my Wix Burn app install in much the same way that MSIEXEC will cache MSI files. Is there a way to programmatically ask Windows or MSI to use the cached version of the Wix Burn app to do the uninstall?
A Possibility:
Presumably I could use MsiGetProductInfo() to get a path to the cached Wix Burn app. To do that, however, I need my app's Product Code. However, Product Codes are not attributes of elements in Wix so I am not seeing how to get a Product Code for a Burn package.
You might be able to solve this by iterating through the Uninstall registry entries. The process is:
Open HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall.
Iterate through the sub-keys searching for an entry where the Publisher and DisplayName matches your product.
If you find an entry, read the value of QuietUninstallString and run that as a command. For a WIX burn installer this is typically in the form C:\ProgramData\Package Cache\{GUID}\SetupProgram.exe /uninstall /quiet.
If you are using a 64 bit operating system you will also need to search HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall.