Unable to start Service with WiX Installer - windows

I'm trying to do a WiX installer with a service install for my C# project. It's the first time I try and I don't understand why it doesn't work.
I have set a ServiceInstall but when I run the setup, I'm blocked in this page :
After a few seconds I got the error :
I created the WiX install from a Visual Studio Installer with the same parameters. There is the code :
<Product ... />
<Feature Id="ProductFeature" Title="$(var.product)" Level="1">
<ComponentRef Id ="MyService"/>
</Feature>
<UIRef Id="WixUI_InstallDir"/>
<!-- Set install directory -->
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER"/>
</Product>
<Fragment>
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="$(var.product)">
<Component Id="MyService" Guid="{GUID-HERE}" KeyPath="yes">
<!-- service will need to be installed under Local Service -->
<ServiceInstall
Id="MyService"
Type="ownProcess"
Vital="yes"
Name="MyService"
DisplayName="Service"
Description=""
Start="auto"
Account="NT AUTHORITY\LocalService"
ErrorControl="normal"/>
<ServiceControl Id="StartDDService" Name="MyService" Start="install" Wait="no" />
<ServiceControl Id="StopDDService" Name="MyService" Stop="both" Wait="yes" Remove="uninstall" />
</Component>
</Directory>
</Directory>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents">
<Component Id="ProductComponent" Guid="{}" Directory="INSTALLFOLDER">
<File Id="MyService.exe" Source="$(var.MyService.TargetDir)\MyService.exe"/>
</Component>
</ComponentGroup>
</Fragment>

The "failure to start" error could be a privilege issue, but the message is just a default message whether it it's privilege or not.
These cases are usually the service itself or a dependency:
A missing dependent Dll (or dependency of a dependency etc) has not been installed. That includes the .NET framework.
The service depends on an assembly being installed to the GAC, and these assemblies are not actually committed when services are started, so that's a special case of a missing dependency.
"Failure to start" is basically that the start code in the service didn't complete. A crash in your OnStart code could cause this. IMO Services should always have tracing available to trace the path and significant values to provide diagnostics.

Related

Unresolved reference to symbol 'WixComponentGroup:MyWebWebComponents' in section

I was following the below code which is product.wxs files.But I am facing an error as below:
Error 5 Unresolved reference to symbol 'WixComponentGroup:MyWebWebComponents' in section 'Product:{}'
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
xmlns:iis="http://schemas.microsoft.com/wix/IIsExtension">
<Product Id="702881b5-9a64-4ab8-ab47-f3babcd950a2"
Name="WixApplication" Language="1033"
Version="1.0.0.0"
Manufacturer="HexWireless"
UpgradeCode="42b7872b-78c8-4a0b-abcd-28a30c9804ab">
<Package InstallerVersion="200" Compressed="yes" Platform="x64" InstallScope="perMachine"/>
<!--<Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />-->
<!--Find the Path to the sqlcmd.exe by performing a registry search. This is hardcoded for SQL 2012.
Change 110 to 100 for 2008. Might need to change the script too.-->
<Property Id="SQLBINDIR">
<RegistrySearch Id="SqlBinDir"
Root="HKLM" Key="SOFTWARE\Microsoft\Microsoft SQL Server\110\Tools\ClientSetup"
Name="Path"
Type="raw"
Win64="yes"/>
</Property>
<Condition Message="Microsoft SQL Server 2012 needs to be installed before this installer can run">
<![CDATA[SQLBINDIR]]>
</Condition>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="INSTALLLOCATION" Name="Database">
<Component Id="Database" Guid="a8dc2Fcd-087d-e393-b059-c67877e51b8a">
<File Id="DatabaseScript" Source="SQLScripts\HexWireless.sql"/>
<RemoveFile Id ="RemoveInstall.log" Name="Install.log" On="uninstall" />
</Component>
</Directory>
<Directory Id="INSTALLDIR" Name="PFiles">
<Directory Id="WixService" Name="Service">
<Component Id="WixWindowsServiceComponent" DiskId="1" Guid="6f51c0f3-776c-4aec-a200-1f199352c6c3" Win64="yes">
<File Id="WixService.exe" Name="WixService.exe" Source="$(var.WixService.TargetDir)\WixService.exe"/>
<ServiceInstall Id="InstallWixService" DisplayName="WixService" Name="WixService.exe" Description="WixService" Account="NT Authority\Network Service" ErrorControl="normal" Start="demand" Type="ownProcess" Vital="yes" />
<ServiceControl Id="ControlWixService" Name="WixService.exe" Stop="uninstall" Remove="uninstall" />
</Component>
</Directory>
</Directory>
<Directory Id="INSTALLFOLDER" Name="Publish">
</Directory>
</Directory>
<Feature Id="ProductFeature" Title="WebApplication" Level="1">
<Feature Id="Database" Title="Database" Description="DatabaseScript" Level="1" Display="expand"
AllowAdvertise="no" ConfigurableDirectory="INSTALLLOCATION" Absent="allow">
<Feature Id="WixWindowsServiceComponent" Title="Service" Description="WixService" Level="1" Display="expand"
AllowAdvertise="no" ConfigurableDirectory="INSTALLDIR" Absent="allow">
<ComponentGroupRef Id="WixWebsiteIssConfiguration" />
<ComponentRef Id="Database"/>
<ComponentRef Id="WixWindowsServiceComponent"/>
<ComponentGroupRef Id="MyWebWebComponents"/>
</Feature>
</Feature>
</Feature>
<Property Id="INSTALLDIR" Value="D:" />
<Media Id="1" Cabinet="WixWindowsServiceComponent.cab" EmbedCab="yes" />
<InstallExecuteSequence>
<!--If the database feature is selected these actions will run to install the DB-->
<Custom Action="Database.cmd" After="InstallFiles" >
<![CDATA[NOT Installed]]>
</Custom>
<!--Ensure this runs after the custom action to set up the properties for its cmd line-->
<Custom Action="Database" After="Database.cmd">
<![CDATA[NOT Installed]]>
</Custom>
</InstallExecuteSequence>
<UI>
<UIRef Id="GUI"/>
<UIRef Id="WixUI_ErrorProgressText" />
</UI>
<!--This is the sequence script. Best way to understand this is by running sqlcmd -?
Use "property" Custom action to get variable substitution working-->
<CustomAction Id="Database.cmd" Property="Database"
Value=""[SQLBINDIR]sqlcmd.exe" -E -S "[SQLSERVER]" -i "[#DatabaseScript]" -o "[INSTALLLOCATION]HexWireless.log""/>
<!-- Note that the cmd line and args will come from a property with the same name as the custom action, this has been set by the custom action above -->
<CustomAction Id="Database" BinaryKey="WixCA" DllEntry="CAQuietExec" Return="check" Execute="deferred" Impersonate="yes" />
</Product>
</Wix>
Thanks In Advance.
I am not sure if your issue is sorted or not, I just faced the same issue even though i have created a few of these msi files with Wix.
In my case, it wasn't finding the "HeatedComponents" that I am generating automatically within the project. I had to load this file into the project, (these files or folders may be inside your project folder but in most cases VS does not load them automatically).
You have to Right Click on the project -> Add -> Existing Item; and select the file/item that is required.

Wix installed app (and shortcut) shows admin symbol

After successfully creating and testing an application I've also manually created the installer for this app using Wix instead the ClickOnce provided by VS.
Anyway, the installation is successful, places all the registry keys in correct locations, same for files where they need to be, and the shortcuts (and all is cleaned up afterwards).
The issue is not critical, I'm just really picky :D
On the main exe file that the Wix setup is installing, and on the shortcuts that points to this, they have the little blue and yellow admin shield on the bottom right of the icons. The application does not require admin permissions to work properly, nor does the application actually bring up the UAC or run as admin anyway (unless explicitly done through right-click > Run as admin).
The question is how do I prevent the shield from being applied to the application and shortcut icons?
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">
<?include "Macros.wxi" ?>
<!-- Installation Settings -->
<Product Id="*"
Name="$(var.NameApp)"
Language="1033"
Version="1.0.0.0"
Manufacturer="$(var.NameCompany)"
UpgradeCode="$(var.GUID_Upgrade)">
<Package InstallerVersion="200"
Compressed="yes"
InstallScope="perMachine"
Comments="Windows Installer Package"/>
<Media Id="1"
Cabinet="product.cab"
EmbedCab="yes"/>
<MajorUpgrade DowngradeErrorMessage="A newer version of this software is already installed" />
<!-- .NET Framework Check -->
<PropertyRef Id="NETFRAMEWORK40CLIENT" />
<Condition Message="This application requires .NET Framework 4.0. Please install the .NET Framework then try again">
<![CDATA[Installed OR NETFRAMEWORK40CLIENT]]>
</Condition>
<!-- Installation files, folders, reg-keys, shortcuts, etc -->
<Directory Id="TARGETDIR" Name="SourceDir">
<!-- Program Files Folder -->
<Directory Id="ProgramFilesFolder">
<!-- Company Application Folder -->
<Directory Id="INSTALLDIR" Name="$(var.NameCompany)">
<!-- Main Application Files -->
<Component Id="CmpAppMain" Guid="$(var.GUID_CmpAppMain)">
<File Id="FileAppMainEXE" Source="$(var.PathExe)" Vital="yes" />
<RegistryKey Root="HKLM"
Key="SOFTWARE\$(var.NameCompany)\$(var.NameApp)">
<RegistryValue Name="installed"
Type="integer"
Value="1"
KeyPath="yes" />
</RegistryKey>
</Component>
<!-- Common DLLs for multiple apps -->
<Component Id="CmpAppLibs" Guid="$(var.GUID_CmpAppLibs)">
<File Id="FileDeviceDLL" Source="$(var.PathLibDevice)" Vital="yes" />
<File Id="FileUtilDLL" Source="$(var.PathLibUtil)" Vital="yes"/>
<RemoveFile Id="FileClrDevice" Directory="INSTALLDIR" Name="Comms.log" On="uninstall"/>
<RegistryKey Root="HKLM"
Key="SOFTWARE\$(var.NameCompany)">
<RegistryValue Name="Lib Path"
Type="string"
Value="[INSTALLDIR]" />
<RegistryValue Name="Lib Ver"
Type="string"
Value="1.0.0"
KeyPath="yes" />
</RegistryKey>
</Component>
<!-- Common Resource Files -->
<Directory Id="FolderResource" Name="rsc">
<Component Id="CmpAppRsc" Guid="$(var.GUID_CmpAppRscs)">
<File Id="RscOilDb" Source="$(var.PathRscOil)" Vital="no" KeyPath="yes"/>
</Component>
</Directory>
</Directory>
<!-- END - Company Application Folder -->
</Directory>
<!-- END - Program Files Folder -->
<!-- Start Menu Folder -->
<Directory Id="ProgramMenuFolder">
<!-- Start Menu Company Folder -->
<Directory Id="ProgramMenuCompany" Name="$(var.NameCompany)">
<Component Id="CmpLnks" Guid="$(var.GUID_CmpLnks)">
<Shortcut Id="LnkStartMenu"
Name="$(var.NameApp)"
Description="$(var.NameApp)"
Target="[INSTALLDIR]$(var.NameExe)"
WorkingDirectory="INSTALLDIR">
<Icon Id="IconApp" SourceFile="$(var.PathRscIco)" />
</Shortcut>
<RegistryKey Root="HKCU"
Key="SOFTWARE\$(var.NameCompany)">
<RegistryValue Name="Lnk"
Type="integer"
Value="1"
KeyPath="yes" />
</RegistryKey>
<RemoveFolder Id="RemoveStartLnk" Directory="ProgramMenuCompany" On="uninstall" />
</Component>
</Directory>
<!-- END - Start Menu Company Folder -->
</Directory>
<!-- END - Start Menu Programs Folder -->
</Directory>
<!-- END - TARTGETDIR -->
<Feature Id="FeatCore" Title="Core Application Files" Level="1">
<ComponentRef Id="CmpAppMain" />
<ComponentRef Id="CmpAppLibs" />
<ComponentRef Id="CmpAppRsc" />
</Feature>
<Feature Id="FeatLnks" Title="Start Menu Shortcut" Level="1">
<ComponentRef Id="CmpLnks" />
</Feature>
</Product>
</Wix>
Does the app have a manifest at all? I'm wondering if it's got a
highestavailable or asInvoker setting that means that it might
sometimes elevate, and I'm assuming from what you said that it doesn't
have a requiresAdministrator setting there.
A manifest is nearly always embedded in the exe itself, that's what
needs verifying. I'm guessing that the exe is being built with an
embedded manifest. No need to include it in the install.
Thanks for the info. The issue was with the manifest which wasn't being generated in the first place due to ClickOnce settings, and then once I've generated or made my own manifest for the project it's also not being embedded into the executable.
ClickOnce publishing places it within the installation directory with the installer it generates for you. Because I didn't want to use click once (and I assumed after reading about the manifest it would be embedded in exe) my app didn't have a manifest...
The only thing I'm curious about now is why the default behavior is to ask for admin rights (I thought that would be the worst thing to do by default).
Anyway... Thanks for the help

How to create a setup project using WiX to install two Visual Studio extensions

I need to create a setup project using WiX to deploy two Visual Studio Extensions(vsix). I create a project follow the steps that you can see in this blog: Creating WiX setup for VSIX. I can compile the project and generate the .msi file, but when I am going to install the extensions, it gave me a runtime error, the error code is 2343.
The XML of the WiX project is this:
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:VSExtension="http://schemas.microsoft.com/wix/VSExtension" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">
<Product Id="{77F7DB1E-6E8A-44DB-88FE-9E496B140A2C}" Name="Bpmn Studio" Language="1033" Version="1.0.0.0" Manufacturer="Cadic" UpgradeCode="8c57d4aa-2b56-4561-94dd-cf02b34a4747">
<Package InstallerVersion="301" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate EmbedCab="yes" VolumeLabel="Bpmn Studio"/>
<PropertyRef Id="VS2013DEVENV"/>
<Condition Message="Visual Studio 2013 needs to be intalled for this installation to continue.">
<![CDATA[Installed OR VS2013DEVENV]]>
</Condition>
<!--Directory structure-->
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" />
<UIRef Id="WixUI_InstallDir" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="Casasoft" >
</Directory>
</Directory>
</Directory>
<Property Id="VSINSTALLDIR">
<RegistrySearch Id="VSInstallRegistry" Root="HKLM" Key="SOFTWARE\Microsoft\VisualStudio\12.0" Name="InstallDir" Type="directory" />
</Property>
<CustomAction Id="SetVSIXInstaller" Return="check" Execute="immediate" Property="VSIXInstaller" Value="C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\VSIXInstaller.exe" />
<CustomAction Id="DeployVSIX" Property="VSIXInstaller" Execute="deferred" Impersonate="no" ExeCommand="/quiet" Return="asyncWait"/>
<InstallExecuteSequence>
<Custom Action="DeployVSIX" After="MsiPublishAssemblies" />
</InstallExecuteSequence>
<Feature Id="BpmnStudio" Title="Bpmn Studio" Level="1">
<ComponentRef Id="BpmnStudioExtensionVSPackage" />
</Feature>
<Feature Id="ProjectTypeFeature" Title="Bpmn Studio Project Type" Level="1">
<ComponentRef Id="VSProjectTypePackage" />
</Feature>
</Product>
<Fragment>
<ComponentGroup Id="VSProjectTypeProductComponents" Directory="INSTALLFOLDER">
<Component Id="VSProjectTypePackage" Guid="BD8BA9C9-3728-4847-8428-EBECE32F79DA">
<VSExtension:VsixPackage File="VsBpmnStudioProjectTypeInstaller" PackageId="86e54529-745f-4b71-85f2-d2eb602bb777" Target="professional" TargetVersion="12.0" Vital="yes" Permanent="yes" />
<File Id="VsBpmnStudioProjectTypeInstaller" Name="BpmnStudioProject.vsix" Source="D:\Work\DSL\2013\Bpmn Studio\Common\Setup\BpmnStudioProject\bin\Debug\BpmnStudioProject.vsix" />
</Component>
</ComponentGroup>
</Fragment>
<Fragment>
<ComponentGroup Id="BpmnStudioExtension" Directory="INSTALLFOLDER">
<Component Id="BpmnStudioExtensionVSPackage" Guid="BD8BA9C9-3728-4847-8429-EBECE32F79DA">
<VSExtension:VsixPackage File="VsPackageInstaller" PackageId="86e54529-745f-4b71-85f2-d2eb602bb767" Target="professional" TargetVersion="12.0" Vital="yes" Permanent="yes" />
<File Id="VsPackageInstaller" Name="CasaSoft.BpmnStudio.DslPackage.vsix" Source="D:\Work\DSL\2013\Bpmn Studio\DslPackage\bin\Debug\CasaSoft.BpmnStudio.DslPackage.vsix" />
</Component>
</ComponentGroup>
</Fragment>
</Wix>
Hi Jason: I found the empty path,Is when I set the path where I want to install the extensions in the UI Interface. The Value INSTALLALLOCATION doesn't exist. I change this value for INSTALLFOLDER and now works as I want

Installing .NET Framework from Wix

I'm using WiX toolset v3.7 and Visual Studio 2013 to create an installer package for an Excel plugin.
The plugin depends on .NET Framework 4.5 and I'd like the installer to automatically detect whether the required framework exists on the target machine and if not, install it.
Googling got me to this page: http://wix.sourceforge.net/manual-wix3/install_dotnet.htm, but the link to instructions on how to create a Bundle is broken on that page.
I've tried adding the element to my root element but end up with errors. I've also tried a few examples I've found on the web but none of them seem to work properly with the default WiX manifest that was generated for me during project creation in VS2013.
What do I need to add to my manifest to enable automatic installation of .NET Framework 4.5?
I'd greatly appreciate any help here! My manifest is shown below:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="Awesome Excel Add-in 1.0" Language="1033" Version="1.0" Manufacturer="Farhan Ahmed" UpgradeCode="7ffd5a6d-d38e-4d6b-b554-098d95791222">
<Package Description="Awesome Excel Add-in Installer" InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<Condition Message="You need to be an administrator to install this product.">
Privileged
</Condition>
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate />
<Feature Id="ProductFeature" Title="AwesomeExcelSetup" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
<CustomAction Id='LaunchInstallerFile' FileKey='fAddinInstaller' ExeCommand='/I /64' Return='asyncWait' />
<CustomAction Id='LaunchRemoverFile' FileKey='fAddinInstaller' ExeCommand='/U' Return='check' />
<InstallExecuteSequence>
<Custom Action='LaunchInstallerFile' After='InstallFinalize'>NOT Installed</Custom>
<Custom Action='LaunchRemoverFile' Before='RemoveFiles'>Installed AND NOT REINSTALL</Custom>
</InstallExecuteSequence>
<UI>
<UIRef Id="WixUI_Minimal" />
</UI>
<Icon Id="icon.ico" SourceFile="$(var.AwesomeExcelAddin.TargetDir)\Awesome.ico"/>
<Property Id="ARPPRODUCTICON" Value="icon.ico" />
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder" Name="PFiles">
<Directory Id="INSTALLPARENT" Name="Awesome" >
<Directory Id="INSTALLFOLDER" Name="Excel Add-in 1.0" />
</Directory>
</Directory>
</Directory>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<Component Id="ProductComponent" Guid="DDD3F332-0DF1-47F0-B8D0-5E1E09BF69BE">
<File Id="f32bitXLL" Source="$(var.AwesomeExcelAddin.TargetDir)\AwesomeAddinPacked32.xll" />
<File Id="f64bitXLL" Source="$(var.AwesomeExcelAddin.TargetDir)\AwesomeAddinPacked64.xll" />
<File Id="fAddinDll" Source="$(var.AwesomeExcelAddin.TargetDir)\AwesomeExcelAddin.dll" />
<File Id="fAddinInstaller" Source="$(var.AwesomeExcelAddinInstaller.TargetDir)\AwesomeExcelAddinInstaller.exe" />
</Component>
</ComponentGroup>
</Fragment>
</Wix>
Thanks to the comment by Netfangled, I was able to move forward.
Like he (she?) mentioned, the trick was to create another project for the Bootstrapper and then reference the .NET Fx and the MSI in that manifest.
Although I did run into a "environment variable not defined" issue, I was able to work around the problem by specifying a source file using the Solution directory as the base.
Here's the new manifest:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Bundle Name="Awesome Excel Plugin Setup" Version="1.0.0.0" Manufacturer="Awesome Software" UpgradeCode="1f605e3b-2954-403c-b9cb-ca1f0e8bf65b">
<WixVariable Id="WixStdbaLogo" Value="Logo.png" />
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />
<WixVariable Id="WixStdbaLicenseRtf" Value="License.rtf" />
<Chain>
<PackageGroupRef Id="NetFx45Redist"/>
<MsiPackage Id="AwesomeExcelSetupMSI"
SourceFile="$(var.SolutionDir)\AwesomeExcelSetup\bin\release\AwesomeExcelSetup.msi"
Vital="yes"
Compressed="yes"/>
</Chain>
</Bundle>
</Wix>

Non-installing MSI file

I am currently working on a tool for system administrators that can be used to update all clients of a Windows AD. It needs to work with Group Policy and SMS for the purpose of doing mass-updating. Therefore I need the tool to result in a MSI file.
Is it possible to create a MSI file that does not install anything but instead only does a custom action (ie. run a script or exe-file).
Best Regards Jakob Simon-Gaarde
Yes, it is possible. Shameful, but, possible.
You can make a square peg fit in a round hole but you lose all of the intended benefits.
FWIW, SMS is now called SCCM and it can call EXE commands.
Found a hackish way to solve my problem:
<?xml version='1.0' encoding='windows-1252'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
<Product
Name='MVLicense Updater' Id='f8fc0a30-c138-1fe2-838b-0845200c9a66'
UpgradeCode='00ca86a0-c889-12e2-8f8b-0800200c9a66'
Language='1033' Version='1.0.0.0' Manufacturer='My Company'>
<Package Id='*' InstallerVersion='200' Compressed='yes' />
<Media Id='1' Cabinet='my.cab' EmbedCab='yes' />
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='ProgramFilesFolder'>
<Directory Id='INSTALLDIR' Name='My-Updater'>
<Component Id='Readme' Guid='68fef080-c87b-34e2-8889-0824200c9a66'>
<File Id='ReadmeTXT' Name='readme.txt' Source='readme.txt' Vital='no' />
<RemoveFolder Id="INSTALLDIR" On="uninstall" />
</Component>
</Directory>
</Directory>
</Directory>
<Feature Id='Complete' Level="1">
<ComponentRef Id='Readme' />
</Feature>
<CustomAction Id="ForceError" Error="1602"/>
<CustomAction Id="RunMyUpdater" BinaryKey="MyUpdaterExe" ExeCommand="dummy" Return="check"/>
<InstallExecuteSequence>
<Custom Action='RunMyUpdater' After='InstallInitialize'></Custom>
<Custom Action="ForceError" After="RunMvlupdate"></Custom>
</InstallExecuteSequence>
<AdminExecuteSequence>
<Custom Action='RunMyUpdater' After='InstallInitialize'></Custom>
<Custom Action="ForceError" After="RunMyUpdate"></Custom>
</AdminExecuteSequence>
<Binary Id="MyUpdaterExe" SourceFile="dist\myupdater.exe" />
<UI>
<Error Id="1602">We have a problem</Error>
</UI>
</Product>
</Wix>
This does the job of running my executable that does some configuration stuff based on calling an internet service and then rolls back the installation because I force an error to occure.

Resources