Wix custom uninstallation action – how to run before msi removing files

The problem is that my custom uninstallation action runs after the removal of standard install files That’s because you have scheduled it before InstallFiles, which comes after RemoveFiles in a standard InstallExecuteSequence. You can also open your MSI file in an editor like Orca or InstEd and have a look at the InstallExecuteSequence table. Sort … Read more

WiX: Digitally Sign BootStrapper project

<Target Name=”UsesFrameworkSdk”> <GetFrameworkSdkPath> <Output TaskParameter=”Path” PropertyName=”FrameworkSdkPath” /> </GetFrameworkSdkPath> <PropertyGroup> <Win8SDK>$(registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.0@InstallationFolder)</Win8SDK> </PropertyGroup> </Target> <Target Name=”UsesSignTool” DependsOnTargets=”UsesFrameworkSdk”> <PropertyGroup> <SignToolPath Condition=”(‘@(SignToolPath)’==”) and Exists(‘$(FrameworkSdkPath)bin\signtool.exe’)”>$(FrameworkSdkPath)bin\signtool.exe</SignToolPath> <SignToolPath Condition=”(‘@(SignToolPath)’==”) and Exists(‘$(Win8SDK)\bin\x86\signtool.exe’)”>$(Win8SDK)\bin\x86\signtool.exe</SignToolPath> </PropertyGroup> </Target> <Target Name=”SignBundleEngine” DependsOnTargets=”UsesSignTool”> <Exec Command=”&quot;$(SignToolPath)&quot; sign /d &quot;App Setup&quot; /t http://timestamp.digicert.com /a &quot;@(SignBundleEngine)&quot;” /> </Target> <Target Name=”SignBundle” DependsOnTargets=”UsesSignTool”> <Exec Command=”&quot;$(SignToolPath)&quot; sign /d &quot;App Setup&quot; /t http://timestamp.digicert.com /a &quot;@(SignBundle)&quot;” … Read more

Passing command line args to MSI from WiX bundle

Your MSI needs to define a property like so: <Property Id=”SOMEPROPERTY” Value=”Default”/> You can then set this property from the bundle: <MsiPackage SourceFile=”<package>.msi” Id=”SomeId”> <MsiProperty Name=”SOMEPROPERTY” Value=”[SomeProperty]” /> </MsiPackage> After this you can set the property in the Bootstrapper as described here: WiX Bootstrapper: How do I set burn variables from the command line? Notice … Read more

Run ExeCommand in customAction as Administrator mode in Wix Installer

The wix documentation here explains the Impersonate attribute: This attribute specifies whether the Windows Installer, which executes as LocalSystem, should impersonate the user context of the installing user when executing this custom action. Typically the value should be ‘yes’, except when the custom action needs elevated privileges to apply changes to the machine. You also … Read more