I have added custom dialog in msi that allows to uninstall user's files. If I install msi everything works perfect when uninstalling and i can see my custom dialog window. But if i install my app through bundle.exe (bundle installs framework if needed and msi itself), during uninstalling it makes silent uninstall (just drop files) and no dialog window I can see. What problem can it be and how to solve it? It is really important for me, because end user will use bundle. Waiting for your answer...
Here is bundle
<Bundle Name="$(var.ProductName)" Version="$(var.ProductVersion)" Manufacturer="$(var.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
<bal:WixStandardBootstrapperApplication LicenseFile="License.rtf"/>
</BootstrapperApplicationRef>
<Chain>
<!-- TODO: Define the list of chained packages. -->
<PackageGroupRef Id="NetFx40Redist"/>
<MsiPackage Id="Synchronizer" SourceFile="$(var.Installer.TargetPath)" DisplayInternalUI="yes" After="NetFx40Redist" />
</Chain>
Related
I am using WixStandardBootstrapperApplication in bundle
It will install .NET 4.8 and one MSI package, Can find code below,
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense">
<bal:WixStandardBootstrapperApplication
ThemeFile="theme.xml"
SuppressOptionsUI="yes"
LicenseUrl=""/>
</BootstrapperApplicationRef>
<Chain DisableRollback="yes">
<PackageGroupRef Id="NetFx48Web"/>
<MsiPackage Id="myMBS"
SourceFile="$(var.Mbs.Updater.TargetPath)"
DisplayInternalUI="yes"/>
</Chain>
Inside that MSI package we have Custom Action to LaunchApplication after InstallFinalize
<InstallExecuteSequence>
<Custom Action="LaunchApplication" After="InstallFinalize" />
</InstallExecuteSequence>
So we don't need to StdBAs bundle to show Success Dialog, How to skip that
I have researched but didint find any workable solution
The WixInternalUIBootstrapperApplication was added in v4.0-preview.1 for this scenario where the bundle has 0-n prerequisites and one main MSI. If the prereqs don't need to be installed then only the splash screen and MSI UI will be shown. Otherwise, the prereq BA shows its UI while installing the prereqs and then closes before showing the MSI UI.
I conclude it is not possible in StdBA
The default UI dialog will come throughout the installation process in StdBA. So skipping the page is not possible yet. Still if needed means then custom BA will help achieve that. I am not tried it yet
Supporting link
https://stackoverflow.com/a/43522884/7013033
More common would be to provide the user an option wether to start the application or not after successful installation of all packages. This could be done by the WixStandardBootstrapperApplication build in property LaunchTarget. Then you could also remove the custom action from the msi installer.
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense">
<bal:WixStandardBootstrapperApplication
ThemeFile="theme.xml"
SuppressOptionsUI="yes"
LicenseUrl=""
LaunchTarget="{YOURAPPLICATIONPATH}"/>
</BootstrapperApplicationRef>
<Chain DisableRollback="yes">
<PackageGroupRef Id="NetFx48Web"/>
<MsiPackage Id="myMBS"
SourceFile="$(var.Mbs.Updater.TargetPath)"
DisplayInternalUI="yes"/>
</Chain>
Documentation https://wixtoolset.org/documentation/manual/v3/xsd/bal/wixstandardbootstrapperapplication.html
I'm new with WiX, and I'm trying to have my Bootstrapper launch my installed application when it completes. To accomplish this, I'm using
<Variable Name="LaunchTarget" Value="path_to_exe"/>
However, it is not easy for me to get the path to the executable. The reason for this is because I'm using <Chain> to install some pre-requisites and then an msi that actually installs my exe.
So to do this, the msi is writting the path to a known location in the registry, and then the bootstrapper reads it and uses it.
The problem is that when the bootstrapper reads the registry, the msi hasn't run yet, so it is unable to run the executable at the end.
Here's my WiX, if it helps:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Bundle Name="My Installation" UpgradeCode="a8964402-f3fc-4878-aafd-31ecda6b685e" Version="1.0.0.0">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
<bal:WixStandardBootstrapperApplication LicenseFile="EULA.rtf"
ThemeFile="theme.xml"
SuppressOptionsUI="yes" />
</BootstrapperApplicationRef>
<Chain>
<PackageGroupRef Id="NetFx40Redist"/>
<ExePackage Id="OpenSSL" SourceFile="pre-requesite.exe" />
<MsiPackage Id="myInstall" SourceFile="mySetup.msi" />
</Chain>
<util:RegistrySearch Root="HKLM"
Key="Software\myProgram"
Value="myEXEPath"
Variable="myEXEPath"
Result="value"
Format="raw" />
<Variable Name="LaunchTarget" Value="[myEXEPath]"/>
</Bundle>
</Wix>
So, in short, I'm trying to have the RegistrySearch run AFTER the MsiPackage installs. Can this be done? If not, what alternatives do I have?
As I side note, if I manually fill in the registry value before installation, everything works fine. This means that besides the order things are running in, everything is working fine.
RegistrySearches run during the Detect operation. Custom BAs could run Detect after Apply, but that's not really an option since you're using the WixStandardBootstrapperApplication.
Lucky for you, WiX v3.9 added support for running the LaunchTarget already elevated, with the requirement that the path to the target .exe be in the registry under HKLM. So you would do this:
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
<bal:WixStandardBootstrapperApplication LicenseFile="EULA.rtf"
ThemeFile="theme.xml"
SuppressOptionsUI="yes"
LaunchTargetElevatedId="MyAEEId" />
</BootstrapperApplicationRef>
<ApprovedExeForElevation Id="MyAEEId"
Key="Software\myProgram" Value="myEXEPath" />
Edit:
It looks like you are required to set LaunchTarget as well. Why doesn't your bundle know where it will be? You can just put in gibberish for LaunchTarget (WixStdBA will try the registry location first), but can't you use built-in variables and/or MsiProperty elements to locate the exe?
I have developed a application which is in a 32-bit and 64-bit format. These applications require corresponding registry entries as well. I am delivering these as separate packages for 32-bit and 64-bit using WiX.
Now my requirement is to create a single installer which installs the components based on OS configuration. I tried using Bootstrapper to bundle my packages.
My bootstrapper code looks as below:
<Bundle Name="Bootstrapper" Version="1.0.0.0" Manufacturer="MYCOMPANY" UpgradeCode="b24f74ca-883c-4572-9479-37d92d733aa0">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />
<Chain>
<ExePackage Id="source1" Compressed="yes" PerMachine="yes" SourceFile="32\Sample.exe" InstallCondition="Not VersionNT64" />
<ExePackage Id="source2" Compressed="yes" PerMachine="yes" SourceFile="64\Sample.exe" InstallCondition="VersionNT64" />
</Chain>
</Bundle>
My bootstrapper output is MSI. When I run the MSI I am getting MainEngineThread is returning 1620 in the verbose log.
Please suggest how can I bundle two EXE's to get single MSI package.
Error 1620 isn't particularly nasty - it just means it can't open the MSI file, and the simplest explanation for that is that your directory structure is incorrect and the exe is calling the MSI install with the incorrect location or name for the MSI file.
I have the following WIX Burn bootstrapper code:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Bundle Name="Test" Version="1.0.0.0" Manufacturer="Test" UpgradeCode="cc44096e-23a6-48ab-a1f1-c75648358049">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense">
<bal:WixStandardBootstrapperApplication SuppressOptionsUI="yes" LicenseUrl="" LogoFile="Logo.bmp"/>
</BootstrapperApplicationRef>
<Variable Name="InstallParameter" bal:Overridable="yes" Type="string" Value="" />
<Chain>
<ExePackage Name="VS2012_Redist_x86_exe" SourceFile="..\vcredist_x86_2012.exe" DetectCondition="ExeDetectedVariable" Permanent="yes" InstallCommand='/Q' />
<ExePackage Name="Pack" SourceFile="..\Install.exe" DetectCondition="ExeDetectedVariable" Permanent="no" InstallCommand='[InstallParameter]' />
</Chain>
</Bundle>
</Wix>
So, it first launches the Visual Studio 2012 redistributable and then the Install.exe.
Install.exe is a setup build with InstallShield 7 (not an MSI based one).
The WIX code compiles fine using WIX 3.7. When running the installer, the VS redistributable installs fine, but the Install.exe starts and when trying to copy the first file it gives me:
---------------------------
Component transfer error
---------------------------
Component: Component1.
File Group:
File:
Error: Catastrophic failure
Any idea how I can launch this InstallShield based installer from the WIX Burn bootstrapper?
EDIT: Turns out the problem was with the Name="Pack" attribute in the second ExePackage. Simply removing that attribute made the installer work. I find it very strange that that attribute can have such side-effect.
Turns out the problem was with the Name="Pack" attribute in the second ExePackage. Simply removing that attribute made the installer work. I find it very strange that that attribute can have such side-effect.
I have a project that I am creating an installer for. I have the msi created that will do the install but I also need to install some pre-reqs (.NET 4.0 and VSTO client tools or whatever they are called)
From what I can tell I need to use a bootstrapper and while it seems to work I really don't want the default dialogs that make me approve the license. I would like to skip that completely. (If I could hide the bootstrapper that would be fine but just having an "Install" button without the EULA would be ok).
Here is the xml I am currently using.
<?xml version="1.0" encoding="UTF-8"?>
<WixVariable Id="WixStdbaLogo" Value="logo.png" />
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
</BootstrapperApplicationRef>
<Chain>
<!-- TODO: Define the list of chained packages. -->
<PackageGroupRef Id="NetFx40Web"/>
<MsiPackage SourceFile="TestRibbonLocationInstaller.msi" DisplayInternalUI="yes" />
</Chain>
</Bundle>
So from what I can tell I need to basically create a custom bootstrap application for this that I then reference as the bootstrapperapplication. By doing this I will be able to better control the UI (Basically hide it).
Is this thought process correct?