In my bootstrapper I want to install one package as a webinstallation. Therefore I added the following MsiPackage to the Bundle´s Chain
<MsiPackage DisplayInternalUI="yes" Visible="yes" Id="NodeJs"
Compressed="no"
ForcePerMachine="yes"
SourceFile="node-v0.10.32-x86.msi"
DownloadUrl="https://nodejs.org/dist/v0.10.32/node-v0.10.32-x86.msi">
<MsiProperty Name="INSTALLFOLDER" Value="[Global_InstallFolder]\NodeJs" />
However, the installation only works as expected when the to-download-msi-file is in the same directory as the bootstrapper-exe.
In other words, it does not download the msi-file.
What am I doing wrong?
Related
I have a package that needs to be installed with elevated administrator privileges. However, this installer includes an uninstall custom action to run a clean-up executable, which must be run as the local user.
This all works fine for the generated MSI (install and uninstall), but when I wrap the MSI up in a Burn bootstrapper, the uninstall custom action is instead run as the administrator - and hence fails...
My application must be installed “perMachine”, and so in my Product.wxs I have my package setup with
InstallPrivileges="elevated"
InstallScope="perMachine"
However, this application's uninstaller includes an uninstall custom action to run a clean-up executable, which must be run as the local user (since it looks for a file in the user’s App-Data). So I’ve set the CustomAction to
Impersonate="yes" Execute="immediate"
And have:
<InstallExecuteSequence>
<Custom Action="UninstallCleanup" Before="RemoveFiles">
(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")
</Custom>
</InstallExecuteSequence>
This builds my MSI file, which I can then install on my machine. When I then run the uninstall, either via the Control Panel or manually (msiexec /x MyInstaller.msi /l* Testing.log), I am prompted for an admin password, the application is uninstalled, and the custom action is run as the local user. Everything perfect.
BUT I need to wrap this MSI up in a WiX Burn bootstrapper EXE that also installs pre-requisites (the VC runtime) before running my MSI package. Now when this Package Bundle is installed, and then uninstalled via the control panel, my MSI uninstall custom action is run as the administrator rather than the local user - and so fails.
In my Bundle.wxs file I have:
<PackageGroup Id="PP_Package">
<MsiPackage
Compressed="yes"
EnableFeatureSelection="no"
SourceFile="$(var.PP_MSI_PATH)"
Permanent="no"
DisplayInternalUI="no"
Visible="no"
Vital="yes">
<MsiProperty Name="INSTALLFOLDER" Value="[InstallFolder]" />
</MsiPackage>
</PackageGroup>
And
<PackageGroup Id="VCRedist">
<ExePackage Id="vcRedist_x86"
Cache="yes"
Compressed="yes"
PerMachine="yes"
Permanent="yes"
Vital="yes"
SourceFile="$(var.VCREDIST_X86_LOC)\$(var.VCREDIST_X86_FILE)"
Name="Redist\$(var.VCREDIST_X86_FILE)"
InstallCommand="/install /quiet /norestart"
Protocol="burn">
<ExitCode Value="1638" Behavior="success" />
<ExitCode Value ="3010" Behavior="forceReboot" />
</ExePackage>
</PackageGroup>
And then:
<Chain>
<PackageGroupRef Id="VCRedist" />
<RollbackBoundary Vital="yes" />
<PackageGroupRef Id="PP_Package" />
</Chain>
What have I got wrong? Is the issue something like: WiX Burn detects that the MSI is perMachine and so starts it using elevated admin, so that the custom action interprets Impersonate="yes" as meaning the administrator rather than the local user?
Any help, explanations and solutions would be most welcome.
I'm working on a Wix project to learn more about Wix. I'm trying to configure my Wix bundle to detect and install .NET 4.5.2 but I'm a little confused. I've seen a lot of examples where the registry is checked but I wanted to know if I can do something like this:
<Chain>
<PackageGroupRef Id="NetFx452Redist" />
<ExePackage Id="Netfx452"
Cache="no"
Compressed="yes"
PerMachine="yes"
Permanent="yes"
Vital="yes"
InstallCommand="/q /norestart"
SourceFile="$(var.ProjectDir)Resources\NDP452-KB2901907-x86-x64-AllOS-ENU.exe"
DetectCondition="NetFx452"
InstallCondition="NOT NetFx452" />
<MsiPackage Id="ShittyMsi"
SourceFile="$(var.MyInstaller.TargetDir)"
Name="$(var.MyInstaller.TargetFileName)" />
</Chain>
If I can't do this and I need to check the registry, how do I know what I need to be looking for in the registry?
You're already using <PackageGroupRef Id="NetFx452Redist" /> so you don't need to check the registry; the package group already takes care of checking the registry and setting the right attributes.
I am new to Wix burn bootstrapper so pardon my ignorance.I have a requirement where i need to install a pre-requisite using burn bootstrapper.
The prerequisite is a setup.exe(third-party) which has dependency on files and a folder(containing couple of files).All these need to exists in the root of setup.exe for the setup.exe to run successfully.
example structure--
setup.exe
samplefile.rsp
files(this is a folder which contains files needed by setup.exe)
Data1.cab
Clientruntime.msi
anotherfile
Here is what i got so far.
<ExePackage Id="Ingres_Client"
Compressed="yes"
PerMachine="yes"
Permanent="yes"
Vital="yes"
SourceFile="setup.exe"
InstallCommand="/r sampleCR.rsp"
InstallCondition="(VersionNT > v5.1 OR VersionNT64 > v5.1)"
DetectCondition="Ingres">
</ExePackage>
I tried to include the nesessary files using PayLoad.But i cant figure out how to add a folder('files' folder) as it is as a requirement for the setup.exe
Any help is appreciated.
Use the Name attribute of child Payload elements.
<ExePackage SourceFile="setup.exe">
<Payload SourceFile="samplefile.rsp" />
<Payload SourceFile="anotherfile" />
<Payload Name="files\data1.cab" SourceFile="files\data1.cab" />
<Payload Name="files\clientruntime.msi" SourceFile="files\clientruntime.msi" />
</ExePackage>
If there are lots and lots of files, it's probably better to just make a self extracting zip archive.
I have strange situation, it seems that OpenXMLSDK msi which is included in WiX bootraper as prerequisite is not installing on user PC. Bellow is my project structure. Any parameter which should I pass to MsiPackage ?
<Chain>
<PackageGroupRef Id="OpenXMLSDK"/>
<MsiPackage Id="MyProject" SourceFile="$(var.MyProjectInstaller.TargetPath)"/>
</Chain>
</Bundle>
<Fragment>
<PackageGroup Id="OpenXMLSDK">
<MsiPackage Id="OpenXMLSDK"
DisplayName="Open XML SDK 2.5 for Microsoft Office"
DownloadUrl="http://download.microsoft.com/download/5/5/3/553C731E-9333-40FB-ADE3-E02DC9643B31/OpenXMLSDKV25.msi"
Compressed="yes"
Cache="yes"
Permanent="yes"
Vital="yes"
SourceFile=".\Prerequisites\OpenXMLSDKV25.msi"
Name ="Prerequisites\OpenXMLSDKV25.msi"/>
</PackageGroup>
</PackageGroup>
</Fragment>
Note: It seems that the OpenXML is actually installing but it is not visible in Control Panel Add/Remove programms
If you want an MsiPackage to be visible in Add/Remove Programs, then you need to set the Visible attribute to yes.
Does Burn support dual-purpose (per-user or per-machine) MSI packages which were prepared according to these Microsoft guidelines?
I tried to prepare such a package, but it looks like bootstrapper created with Burn doesn't uninstall MSI package, which was installed per-machine after raising UAC privileges by End-User.
The source code for Burn is:
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Bundle Version="1.0"
Name="AppNameHere"
UpgradeCode="GuidHere">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense" >
<bal:WixStandardBootstrapperApplication LicenseUrl=""
SuppressOptionsUI="yes"
ThemeFile="Customization\Theme.xml"
LocalizationFile="Customization\LangHere.wxl"/>
</BootstrapperApplicationRef>
<Chain>
<PackageGroupRef Id="WindowsInstaller45"/>
<PackageGroupRef Id="NetFx40ClientRedist"/> <!-- Uzywa rozszerzenia WixNetfxExtension do zainstalowania .net -->
<PackageGroupRef Id="vcredist"/>
<MsiPackage Compressed="yes"
SourceFile="MsiFileNameHere"
DisplayInternalUI="yes">
<MsiProperty Name="UPDATEDIR" Value="[UninstallPath]"/>
<MsiProperty Name="WIXBUNDLEKEY" Value="[WixBundleProviderKey]"/>
</MsiPackage>
</Chain>
</Bundle>
<Fragment>
<util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\VisualStudio\10.0\VC\VCRedist\x86" Value="Installed" Variable="vcredistkeyx86" />
<util:RegistrySearch Root="HKLM" Key="SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\VC\VCRedist\x86" Value="Installed" Variable="vcredistkeyx64" />
<PackageGroup Id="vcredist">
<ExePackage Id="vcredist_x86"
Cache="no"
Compressed="yes"
PerMachine="yes"
Permanent="yes"
Vital="yes"
SourceFile="Components\vcredist_x86.exe"
DetectCondition="(vcredistkeyx86 AND (vcredistkeyx86 >= 1)) OR (vcredistkeyx64 AND (vcredistkeyx64 >= 1))" />
</PackageGroup>
<PackageGroup Id="WindowsInstaller45">
<ExePackage Cache="no"
Compressed="yes"
PerMachine="yes"
Permanent="yes"
Vital="yes"
SourceFile="Components\WindowsXP-KB942288-v3-x86.exe"
InstallCondition="VersionNT=v5.1 AND NOT VersionNT64 AND VersionMsi < v4.5"
InstallCommand="/quiet /norestart">
<ExitCode Behavior="forceReboot"/>
</ExePackage>
</PackageGroup>
</Fragment>
</Wix>
As of WIX V3.9 the answer is a qualified "No" - Burn doesn't currently support dual-purpose per-user or per-machine MSI package.
A dual-purpose MSI package has the ALLUSERS property set to "2". When you build a WIX bootstrapper project referencing this type of MSI package you should see this type of warning:
2>D:\Robert\Documents\Visual Studio 2013\Projects\BurnTest\Bootstrapper\Bundle.wxs(18,0): warning LGHT1133: Bundles require a package to be either per-machine or per-user. The MSI 'D:\Robert\Documents\Visual Studio 2013\Projects\BurnTest\SetupProject\bin\Release\SetupProject.msi' ALLUSERS Property is set to '2' which may change from per-user to per-machine at install time. The Bundle will assume the package is per-machine and will not work correctly if that changes. If possible, remove the Property with Id='ALLUSERS' and use Package/#InstallScope attribute instead.
The build process for a WIX bootstrapper project will try and work out from the chained packages what type of burn installation to create (per-user or per-machine). The logic is convoluted because of the different places you can declare a preference for per-user or per-machine, and the potential conflicts between chained packages. But the general idea is the burn compiler will generate a per-machine installation, unless one of the chained packages is per-user, which will flip the burn installation into per-user mode. The key point is the decision to create a per-user or per-machine package is made at build time. To properly support dual-purpose MSI packages that decision would need to be moved to install time.