How to uninstall inno setup application from Wix bundle - wix

My Wix bundle is installing a few 3rd party EXE packages that are packaged with Inno setup. As you know, Inno Setup uninstaller is a separate executable. Basically, when you install AThirdParty.EXE - it creates an unin000.exe within its deployed folder ( e.g. C:\Program Files (x86)\AThirdPartyApp\unins000.exe ), and that's what I need to execute during my bundle uninstall.. Anyone know how to it with Wix Bootstrapper?
Below is an example of my ExePackage:
<PackageGroup Id="MyThirdPartyPackages">
<ExePackage Id="AThirdPartyExe"
DisplayName="A Third Party Exe"
Cache="yes"
Compressed="yes"
PerMachine="yes"
Permanent="no"
Protocol="none"
Vital="yes"
SourceFile=".\AThirdPartyExe.exe"
DetectCondition="AThirdPartyExeExists"
InstallCommand="/VERYSILENT /SUPPRESSMSGBOXES"
UninstallCommand="[ThirtdPartyEXEPath]\unins000.exe" <!-- Can I use uninstallcommand for this?? -->
/>
</PackageGroup>

Assuming Inno Setup doesn't support an /uninstall flag (no idea but if so yet another reason to only use MSI ) and you don't want to repackage the installer into an MSI the quickest solution I can think of is a man in the middle EXE.
InstallShield used to (may still) have a Helper.exe for some of it's setup prerequisites. You would code it to accept a /INSTALL and /UNINSTALL argument and have WiX call that instead. It would in turn call the actual install and uninstall as you described above.

Related

Wix Bootstrapper how to uninstall packages in different order from the install order

My wix bootstrapper has a chain that looks like this:
<Chain>
<MsiPackage Id="msipack"/>
<ExePackage Id="exepack"/>
</Chain>
msipack installs all program files on the computer as well as some files necessary for exepack to run. However when uninstalling the bootstrapper I want to run exepack first because if it is run after msipack, then the files needed for the uninstall of exepack are already removed.
Turns out the bootstrapper already did what I wanted it to. It just didn't wait for the uninstall of exepack to finish so it deleted the files and the uninstall failed.

Uninstall WiX bootstrapper after I uninstall my msi

I have one WiX setup project which produces my application's msi installer and I have also setup the uninstall shortcut feature for the application. In addition, I have a WiX bootstrapper project which detects and install .NET and VC++ during installation on the user's computer.
The bootstrapper works fine and can detect and install .net and vc++, and also install my application.
However, the issue I am facing is that when I uninstall my application using the shortcut in the Program Menu folder, it can successfully uninstall my application but there still is an entry of the bootstrapper in the "Add and Remove Programs(ARP)". I have to manually uninstall it by going on to the ARP.
My question is: How do I uninstall the bootstrapper exe without having to go to the ARP everytime? My msi uninstalls fine from the shortcut but I do not know how I can uninstall the exe with a shortcut.
This is how my bootstrapper bundle looks like:
<Chain>
<!-- NetFx46Web: Checks whether .NET 4.6 is installed in user comp. If not, install it via a web installer -->
<PackageGroupRef Id="NetFx46Web"/>
<!-- VC++ 2013 install -->
<PackageGroupRef Id="vcredist2013_x86"/>
<!-- Reference the setup msi installer -->
<MsiPackage Id="my_msi" SourceFile="$(var.InstallProj.TargetPath)" DisplayInternalUI="yes" />
</Chain>

Silent .NET Framework on WiX

I have a WiX installer and, as part of the installation process, I'm installing the offline .NET Framework installer.
<ExePackage Id = "DotNetFramework.Setup" SourceFile="..\DotNetFramework\NDP461-KB3102436-x86-x64-AllOS-ENU.exe" />
Is there any way to install it in silent mode?
Every solution I find tell to launch msiexec specifying the parameters, for example:
msiexec /i product.msi APPLICATIONFOLDER="C:\Program Files\Company\Product\"
but my ExePackage just asks for the SourceFile, not a proper command
ExePackage element has an InstallCommand attribute, where you can specify the silent flag. For example:
<ExePackage
Id="SomeId"
InstallCommand="/norestart /q"
SourceFile="SomeFile.exe" />
For more information about .Net Framework Installation flags, see https://learn.microsoft.com/en-us/dotnet/framework/deployment/deployment-guide-for-developers

Upgrade older msi from Wix custom BA Bundle

We are upgrading our WIX msi installer (not a bundle) with manual pre-requisites to a Managed custom Bootstrapped application Bundle. The boot strapped custom installer bundle exe works fine for fresh installs. But if we want to upgrade our older product which is just an msi, we are in trouble. This is what I am trying to do
Detect RelatedMsiFeatureHandler detects there is an older msi package installed.
I am handling the Plan events for individual packages and setting the states as desired. For ex: state = Present for install
I cannot to Apply(UpdateReplace) because I do not have an older Bundle,
The million dollar question is how do I upgrade this msi package?
Any help is appreciated.
Thanks
All I had to do was set the MsiProperty UPGRADE=1 in Bundle.wxs for the relevant Msi Package in the chain. This made sure that when the Bundle.exe is run the specific msi is upgraded BTW: this is the first version of Bundle for us. We had just an MSI before for installation.
<MsiPackage DisplayName="Installing Main Product" SourceFile="$(var.Path_Setup)" DisplayInternalUI="no" SuppressSignatureVerification="yes" >
***<MsiProperty Name="UPGRADE" Value="1"/>***
<MsiProperty Name="NAS_PATH" Value="[NasBackupPath]"/>
<MsiProperty Name="NAS_BAK_TIME" Value="[BackupTime]"/>
</MsiPackage>
</Chain>
Just in case if anyone having similar issue (WIX 3.10)
this statment under the installer's Product will resolve the issue. You must update the version of the product and product upgrade code must be same with previous install.
"AllowSameVersionUpgrades" = yes will make sure not to install same product side by side.

WiX Bootstrapper - Minor Upgrade

I have a bootstrapper which is built using Burn and installs a package which i have setup to allow for minor upgrades when i run the msi packages using REINSTALL=ALL REINSTALLMODE=vomus from the command prompt (as per this article in the WiX docs).
However currently trying to upgrade with the setup.exe returns the message "Another version of this product is already installed..."
How do i get the boosttrapper to upgrade it's packages?
According to this question from 2009 burn "will be able" do the work of starting the MSI in the appropriate mode can it do it now?
I have tried using the MsiProperty element like this:
<MsiPackage Id="PackageId" SourceFile="path\to\my.msi">
<MsiProperty Name="REINSTALL" Value="ALL"/>
<MsiProperty Name="REINSTALLMODE" Value="vomus"/>
</MsiPackage>
But that doesn't seem to do it. What have i Missed?
If you are doing a minor upgrade Burn will automatically detect that and
pass the right switches for you. If you are trying to force it Burn does not support that.