Include all Files in Bin folder in Wix installer

This solution works with WIX 3.11. To harvest an entire directory, you can use Heat from the WIX toolset. With Heat we can automatically include all files from a given source directory on every build. To do that we first need to edit the Setup.wixproj: Define the Harvestpath for Heat: <PropertyGroup> <DefineConstants>HarvestPath=…\Deploy</DefineConstants> </PropertyGroup> Heat will … Read more

Make WiX installation set upgrade to the same folder

There’s an example in the WiX tutorial: https://www.firegiant.com/wix/tutorial/getting-started/where-to-install/ <Property Id=”INSTALLDIR”> <RegistrySearch Id=’AcmeFoobarRegistry’ Type=”raw” Root=”HKLM” Key=’Software\Acme\Foobar 1.0′ Name=”InstallDir” /> </Property> Of course, you’ve got to set the registry key as part of the install too. Stick this inside a component that’s part of the original install: <RegistryKey Key=”Software\Software\Acme\Foobar 1.0″ Root=”HKLM”> <RegistryValue Id=”FoobarRegInstallDir” Type=”string” Name=”InstallDir” Value=”[INSTALLDIR]” /> … Read more

I screwed up, how can I uninstall my program?

Update, Stein Åsmul: Injecting this newer list of cleanup approaches. Find your package in C:\Windows\Installer, where Windows keeps copies of installed MSI packages. The names are generated randomly, so you’ll have to look at the creation dates of the files. Open the MSI file with Orca. (Unfortunately there is no simple download for the orca … Read more

Build WiX 3.6 project targeting x64?

Windows installers cannot be built to target Any CPU, I typically build twice, with the managed code being set to Any CPU, whilst the installer has two configurations x86 and x64. You may find you need to create the configurations, this can be done by right clicking on the solution and selecting configuration manager then … Read more

Windows installer deletes versioned file during product upgrade, instead of downgrading it

We also encountered this problem where lower-versioned DLLs were not getting reinstalled on a major upgrade. I thought it was strange that the installer would decide which files to install based on the versioning of existing files, then completely uninstall everything, but still only install what what files had been determined to install before uninstalling … Read more

Using Wix to create 32bit and 64bit installers from one .wxs file

Rather than conditionally including the opening Directory elements (which invalidates the XML), conditionally set preprocessor variables which are used as directory names, as @Daniel Pratt’s comment refers to. Similarly, having a “yes/no” variable conditioned on platform makes it easy to set up 64 bit components, registry searches, etc. Defining the variables (From this answer) <?if … Read more

WiX Relative Path to the Source File

You can use the relative path like so: <File Id=”Bla.exe” Source=”..\bin\Debug\Bla.exe” KeyPath=”yes” Checksum=”yes”/> OR You can add a configuration file to your project to define common variables. To do so, add a new “WiX Include” file to your project, call it config.wxi. Then in your include file, you can define a SourceDir variable like so: … Read more

Where is Microsoft.Deployment.WindowsInstaller found?

It’s part of Windows Installer XML (WiX) an open source project formerly from Microsoft but since transferred to the Outercurve Foundation. It can be found on CodePlex. 3.7 is the latest release. This interop assembly is part of Deployment Tools Foundation (DTF) and you’ll find an SDK help file installed in the start menu. The … Read more

tech