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.
Related
I'm trying to create a wix application that checks for windows install version and downloads the appropriate .net version. It should also check for the windows version.
I've created a .msi with a wix 3.0 project that checks for the appropriate windows version.
<InstallExecuteSequence>
<Custom Action="SetARPINSTALLLOCATION" After="InstallValidate"></Custom>
</InstallExecuteSequence>
<CustomAction Id="SetARPINSTALLLOCATION" Property="ARPINSTALLLOCATION" Value="[INSTALLDIR]" /> <Condition Message="Your version of Windows is too low">
<![CDATA[Installed OR (VersionNT <= 602)]]>
</Condition>
And I've create a burn bootstrapper that downloads .net 4.5.1 and downloads it if it's not installed.
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />
<Chain>
<PackageGroupRef Id="NetFx451Web"/>
<MsiPackage Id="programName" SourceFile="$(var.SolutionDir)SetupProject1/bin/Release/programNameInstaller.msi"/>
</Chain>
I want to combine these two projects somehow, because apparently this doesn't function together for some reason. I'd like the windows version to be checked first if possible so that .net version doesn't download if the user isn't running windows that is high enough.
Okay I've gotten this figured out. Here is the finished version. (as of now) You will also need to install the dependencies for WixNetFxExtension.dll and WixBalExtension and I believe also WixUtilExtension
<?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="MyProgramInstaller" Version="1.0.0.0" Manufacturer="myCompany" UpgradeCode="18b18295-d4a1-4174-99ad-f82f6ca4f7ff">
<!-- checking here for anything over windows 7 you can change this value using the following chart -->
<!-- https://learn.microsoft.com/en-us/windows/desktop/Msi/operating-system-property-values -->
<bal:Condition Message="This application requires Windows 7 or higher to run.">
<![CDATA[Installed OR (VersionNT >= 601)]]>
</bal:Condition>
<!-- here's the license statement, would suggest you update this to something more useful. -->
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />
<Chain>
<!-- here's the .net download installer you can change this using the following chart -->
<!-- http://wixtoolset.org/documentation/manual/v3/customactions/wixnetfxextension.html -->
<PackageGroupRef Id="NetFx451Web"/>
<MsiPackage Id="myProgram" SourceFile="$(var.SolutionDir)SetupProject1/bin/Release/myProgramInstaller.msi"/>
</Chain>
</Bundle>
</Wix>
Cheers!
I am trying to install the Visual C++ Redistributables along with the .msi for my application. However when I go to install the project I keep getting a "Another install is currently running error". Here is my bundle.wxs file:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Bundle Name="Application" Version="1.0.0.0" Manufacturer="Manufacturer" UpgradeCode="6c5daa41-4ce9-4f20-94b2-2471a6932542">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />
<Chain>
<!-- TODO: Define the list of chained packages. -->
<!-- <MsiPackage SourceFile="path\to\your.msi" /> -->
<PackageGroupRef Id="MyPackage" />
<MsiPackage Id="MyApplication" SourceFile=".\Application.msi"/>
</Chain>
</Bundle>
<Fragment>
<PackageGroup Id="MyPackage">
<ExePackage Id="VisualCPlusPlus32Bit"
DisplayName="Microsoft Visual C++"
SourceFile=".\vcredist_x86.exe"
Vital="no"
InstallCommand="/q /ACTION=Install"
DetectCondition="NOT VersionNT64"/>
<ExePackage Id="VisualCPlusPlus64Bit"
DisplayName="Microsoft Visual C++"
SourceFile=".\vcredist_x64.exe"
Vital="no"
InstallCommand="/q /ACTION=Install"
DetectCondition="VersionNT64"/>
</PackageGroup>
</Fragment>
</Wix>
I have looked at the docs for wix and this tutorial but I still cant get the Visual C++ libraries installed first without two installs run concurrently.
Thanks!
See How To: Install the Visual C++ Redistributable with your installer. This approach uses a Merge Module to include the Visual C++ Redistributables with your msi instead of running vcredist as a separate installer.
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 am using Sharp Develop 4.4.1 to create a wix installer package for my application. The WIX version is the one that came with Sharp Develop, namely version 3.8.
My MSI project builds just fine.
Now I want to include the MSI in a bundle. In the bundle, I want to check if .net 4.5 and ghostscript are installed (otherwise install it). The .net package check is a breeze using packagegroupref.
So far so good.
However, I also want to check if Ghostscript is installed and intend to do this by doing a registry search. Since I am working in a Bundle, I am trying to use <util:RegistrySearch....., but I get an error stating: The Fragment element contains an unhandled extension element 'util:RegistrySearch'. Please ensure that the extension for elements in the 'http://schemas.microsoft.com/wix/UtilExtension' namespace has been provided. (CNDL0200) - d:\SharpDev Projects\NREOutlookTest1\AIFBundle\Setup.wxs:20
This is my bundle code:
<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Bundle UpgradeCode="ae0120aa-0ba8-45ac-b3e5-fce0f6b05de6"
Name="!(bind.packageName.AIF)"
Version="!(bind.packageVersion.AIF)"
Manufacturer="!(bind.packageManufacturer.AIF)"
IconSourceFile=".\images\stamp.ico">
<WixVariable Id="WixStdbaLicenseUrl" Value="myurl" />
<WixVariable Id="WixStdbaLogoFile" Value="..\NREOutlookTest1\images\stamp.jpg" />
<WixVariable Id="WixStdbaLogoSideFile" Value="..\NREOutlookTest1\images\stamp.jpg" />
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkSidebarLicense" />
<Chain>
<PackageGroupRef Id="NetFx45Web" />
<PackageGroupRef Id="Ghostscript" />
<MsiPackage Id="AIF" SourceFile="..\AIFSetup\bin\Release\AIFSetup.msi" Visible="no" />
</Chain>
</Bundle>
<Fragment>
<util:RegistrySearch Root="HKLM" Key="SOFTWARE\GPL Ghostscript\9.14" Value="GS_DLL" Variable="GhostScriptDetect" />
<PackageGroup Id="Ghostscript">
<ExePackage
Id="gs914"
DisplayName="GPL Ghostscript"
Cache="no"
Compressed="no"
Permanent="no"
Vital="yes"
DetectCondition="GhostScriptDetect >> "gsdll32.dll""
InstallCommand="/S"
SourceFile="gs914w32.exe"
DownloadUrl="http://downloads.ghostscript.com/public/gs914w32.exe" />
</PackageGroup>
</Fragment>
</Wix>
I have included the Wix Extension WixUtilExtension.dll in the project:
OK. I am officially an idiot. I have a post compile script running in sharpdevelop that is doing a candle and light action. I forgot to include the extension in the candle command, which gave me the error. DOH!!
I'm using WiX Burn to lay down .NET 4.5. It seems really straightforward from the documentation, How To: Install the .NET Framework Using Bur.
My installer is dead simple:
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Bundle Name="My App"
Version="1.0.0.0"
Manufacturer="My Company"
UpgradeCode="My GUID-4fa299bf4589"
IconSourceFile="My Icon File" >
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" >
<bal:WixStandardBootstrapperApplication
SuppressOptionsUI="yes"
LicenseFile="License.rtf"
LogoFile="Installer_Banner.bmp"/>
</BootstrapperApplicationRef>
<Chain>
<PackageGroupRef Id="NetFx45Web" />
<MsiPackage
DisplayName="My App Name"
SourceFile="myMSI.msi"></MsiPackage>
</Chain>
</Bundle>
</Wix>
But when I run the generated EXE file it wants to install .NET 4.5 beta. I've got WiX 3.6.3303 which is RTM and Visual Studio 2012 RTM. How can I fix this problem?
The correct URLs for NETFX v4.5 are used in WiX v3.8. It was a mistake that the URLs were not updated sooner.