Remove existing product and install it again.guide me with example code - wix

I want to add feature if setup run second time it will remove existing product first. without version feature. kindly guide me how i make sure if product already exist. setup will remove it first and install it again and after installation launch application.
OR
if product with same version already exist setup launch the Application.
its good if having sample code please share that too. Thanks advance.
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?define EmbeddApp_TargetDir=$(var.EmbeddApp.TargetDir)?>
<Product Id="*" Name="Troytec_TestEngine" Language="1033" Version="1.0.0.0" Manufacturer="TroyTec" UpgradeCode="c28ad43a-4fe4-4d14-ba4f-6422c00b13c2">
<Package Id="*" InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<!--<MajorUpgrade AllowDowngrades="yes" />-->
<MediaTemplate />
<Property Id="PREVIOUSVERSIONSINSTALLED" Secure="yes" />
<Upgrade Id="a61287ef-e184-421b-ac76-d8b91e489a6d">
<UpgradeVersion
Minimum="1.0.0.0" Maximum="99.0.0.0"
Property="PREVIOUSVERSIONSINSTALLED"
IncludeMinimum="yes" IncludeMaximum="no" />
</Upgrade>
<Feature Id="ProductFeature" Title="Troytec_TestEngine" Level="1">
<ComponentGroupRef Id="ProductComponents" />
<ComponentRef Id="ApplicationShortcut" />
<ComponentRef Id="ApplicationShortcutDesktop" />
<ComponentRef Id="CMP_MyEmptyDir" />
<ComponentRef Id="CMP_MyEmptyDir2" />
<ComponentRef Id="CMP_MyEmptyDir3" />
</Feature>
<!--Step 2: Add UI to your installer / Step 4: Trigger the custom action-->
<!--<UI>
<UIRef Id="WixUI_Minimal" />
<Publish Dialog="ExitDialog"
Control="Finish"
Event="DoAction"
Value="LaunchApplication">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed</Publish>
</UI>-->
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Launch My Application Name" />
<!--Step 3: Include the custom action-->
<!--<Property Id="WixShellExecTarget" Value="[EmbeddApp.exe]" />-->
<CustomAction Id="LaunchApplication"
BinaryKey="WixCA"
DllEntry="WixShellExec"
Impersonate="yes" />
</Product>
<!--<Fragment>
<InstallExecuteSequence>
<Custom Action='902bc339-5cef-4f74-9d04-07941afa8ba1' Before='6d48fcc2-99cb-4ab6-867a-79f0484db05c'>
(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")
</Custom>
</InstallExecuteSequence>
</Fragment>-->
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="Troytec_TestEngine" >
<Directory Id="FOLDER1" Name="GPUCache">
</Directory>
<Directory Id="FOLDER2" Name="locales">
</Directory>
<Directory Id="FOLDER3" Name="swiftshader">
</Directory>
</Directory>
</Directory>
<Directory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="Troytec_TestEngine" />
</Directory>
<Directory Id="DesktopFolder" Name="Desktop"/>
</Directory>
</Fragment>
<Fragment>
<Icon Id="City.ico" SourceFile="letter-t-24.ico" />
<DirectoryRef Id="ApplicationProgramsFolder">
<Component Id="ApplicationShortcut" Guid="9bd13330-6540-406f-a3a8-d7f7c69ae7f9">
<Shortcut Id="ApplicationStartMenuShortcut" Name="Troytec_TestEngine" Description="MyWpfApplication" Target="[INSTALLFOLDER]EmbeddApp.exe" WorkingDirectory="INSTALLFOLDER" Icon ="City.ico" />
<RemoveFolder Id="RemoveApplicationProgramsFolder" Directory="ApplicationProgramsFolder" On="uninstall" />
<RegistryValue Root="HKCU" Key="Software\MyWpfApplication" Name="installed" Type="integer" Value="1" KeyPath="yes" />
</Component>
</DirectoryRef>
<DirectoryRef Id="DesktopFolder">
<Component Id="ApplicationShortcutDesktop" Guid="cde1e030-eb64-49a5-b7b8-400b379c2d1a">
<Shortcut Id="ApplicationDesktopShortcut" Name="Troytec_TestEngine" Description="MyWpfApplication" Target="[INSTALLFOLDER]EmbeddApp.exe" WorkingDirectory="INSTALLFOLDER" Icon ="City.ico" />
<RemoveFolder Id="RemoveDesktopFolder" Directory="DesktopFolder" On="uninstall" />
<RegistryValue Root="HKCU" Key="Software\Troytec_TestEngine" Name="installed" Type="integer" Value="1" KeyPath="yes" />
</Component>
</DirectoryRef>
</Fragment>
<Fragment>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. -->
<!-- <Component Id="ProductComponent"> -->
<!-- TODO: Insert files, registry keys, and other resources here. -->
<!-- </Component> -->
<Component Id="EmbeddApp.exe" Guid="85c6f764-7517-4bc6-8e5a-ec52ae6ece1e">
<File Id="EmbeddApp.exe" Name="EmbeddApp.exe" Source="$(var.EmbeddApp_TargetDir)EmbeddApp.exe" />
</Component>
<Component Id="EmbeddApp.exe.config" Guid="8ee125d7-7043-498a-ad65-24055252218a">
<File Id="EmbeddApp.exe.config" Name="EmbeddApp.exe.config" Source="$(var.EmbeddApp_TargetDir)EmbeddApp.exe.config" />
</Component>
<Component Id="CefSharp.WinForms.dll" Guid="9fdb1c25-2275-4a14-8f4f-6832b7a617dc">
<File Id="CefSharp.WinForms.dll" Name="CefSharp.WinForms.dll" Source="$(var.EmbeddApp_TargetDir)CefSharp.WinForms.dll" />
</Component>
<Component Id="CefSharp.dll" Guid="9bdbc9cc-52a6-4213-b941-0248e995aa71">
<File Id="CefSharp.dll" Name="CefSharp.dll" Source="$(var.EmbeddApp_TargetDir)CefSharp.dll" />
</Component>
<Component Id="CefSharp.Core.dll" Guid="0e058c32-f73b-4b3f-acbd-b0c29c019297">
<File Id="CefSharp.Core.dll" Name="CefSharp.Core.dll" Source="$(var.EmbeddApp_TargetDir)CefSharp.Core.dll" />
</Component>
<!--other files-->
<Component Id="cef.pak" Guid="283c053a-c66e-4889-9c6b-2884b50b8cbb">
<File Id="cef.pak" Name="cef.pak" Source="$(var.EmbeddApp_TargetDir)cef.pak" />
</Component>
<Component Id="cef_100_percent.pak" Guid="12342b21-68e4-4874-ac3f-87ac8a9f40c2">
<File Id="cef_100_percent.pak" Name="cef_100_percent.pak" Source="$(var.EmbeddApp_TargetDir)cef_100_percent.pak" />
</Component>
<Component Id="cef_200_percent.pak" Guid="b261180b-0fa2-41ea-ba8d-63d329f2d047">
<File Id="cef_200_percent.pak" Name="cef_200_percent.pak" Source="$(var.EmbeddApp_TargetDir)cef_200_percent.pak" />
</Component>
<Component Id="cef_extensions.pak" Guid="a4a0a9d0-0308-46be-b24a-7de985018039">
<File Id="cef_extensions.pak" Name="cef_extensions.pak" Source="$(var.EmbeddApp_TargetDir)cef_extensions.pak" />
</Component>
<Component Id="CefSharp.BrowserSubprocess.Core.dll" Guid="f3e2f9bc-066a-43f0-9e14-445d7af00243">
<File Id="CefSharp.BrowserSubprocess.Core.dll" Name="CefSharp.BrowserSubprocess.Core.dll" Source="$(var.EmbeddApp_TargetDir)CefSharp.BrowserSubprocess.Core.dll" />
</Component>
<Component Id="CefSharp.BrowserSubprocess.Core.pdb" Guid="6127f13d-4b77-4a7f-992d-5b49abb2dfee">
<File Id="CefSharp.BrowserSubprocess.Core.pdb" Name="CefSharp.BrowserSubprocess.Core.pdb" Source="$(var.EmbeddApp_TargetDir)CefSharp.BrowserSubprocess.Core.pdb" />
</Component>
<Component Id="CefSharp.BrowserSubprocess.exe" Guid="4b029801-a97e-47a0-8f37-0a0540bed89e">
<File Id="CefSharp.BrowserSubprocess.exe" Name="CefSharp.BrowserSubprocess.exe" Source="$(var.EmbeddApp_TargetDir)CefSharp.BrowserSubprocess.exe" />
</Component>
<Component Id="CefSharp.BrowserSubprocess.pdb" Guid="d47f6d16-c6f5-4cf3-98a8-a342444e225f">
<File Id="CefSharp.BrowserSubprocess.pdb" Name="CefSharp.BrowserSubprocess.pdb" Source="$(var.EmbeddApp_TargetDir)CefSharp.BrowserSubprocess.pdb" />
</Component>
<Component Id="CefSharp.Core.pdb" Guid="f9ae3c06-3c49-40af-8047-da555d43304b">
<File Id="CefSharp.Core.pdb" Name="CefSharp.Core.pdb" Source="$(var.EmbeddApp_TargetDir)CefSharp.Core.pdb" />
</Component>
<Component Id="CefSharp.Core.xml" Guid="71e6a1c8-e1c2-4f41-bf09-c664cd62b0a7">
<File Id="CefSharp.Core.xml" Name="CefSharp.Core.xml" Source="$(var.EmbeddApp_TargetDir)CefSharp.Core.xml" />
</Component>
<Component Id="CefSharp.pdb" Guid="1f6df66a-972c-4945-a675-ab7f6bff3207">
<File Id="CefSharp.pdb" Name="CefSharp.pdb" Source="$(var.EmbeddApp_TargetDir)CefSharp.pdb" />
</Component>
<Component Id="CefSharp.WinForms.pdb" Guid="9f9aa753-8be7-4349-bf90-3799c9cb8560">
<File Id="CefSharp.WinForms.pdb" Name="CefSharp.WinForms.pdb" Source="$(var.EmbeddApp_TargetDir)CefSharp.WinForms.pdb" />
</Component>
<Component Id="CefSharp.WinForms.xml" Guid="56dc62fa-e64e-4f92-a8df-3415423e65cd">
<File Id="CefSharp.WinForms.xml" Name="CefSharp.WinForms.xml" Source="$(var.EmbeddApp_TargetDir)CefSharp.WinForms.xml" />
</Component>
<Component Id="CefSharp.xml" Guid="c567fe97-a411-477d-8f5b-82432593c090">
<File Id="CefSharp.xml" Name="CefSharp.xml" Source="$(var.EmbeddApp_TargetDir)CefSharp.xml" />
</Component>
<Component Id="chrome_elf.dll" Guid="8272cf27-65c6-499e-b503-b56ed9f80db1">
<File Id="chrome_elf.dll" Name="chrome_elf.dll" Source="$(var.EmbeddApp_TargetDir)chrome_elf.dll" />
</Component>
<Component Id="d3dcompiler_47.dll" Guid="3405163c-2405-41e7-aeef-3f4f65df1dd2">
<File Id="d3dcompiler_47.dll" Name="d3dcompiler_47.dll" Source="$(var.EmbeddApp_TargetDir)d3dcompiler_47.dll" />
</Component>
<Component Id="devtools_resources.pak" Guid="e2ffd1f6-9283-442f-b83f-fde86ddf1553">
<File Id="devtools_resources.pak" Name="devtools_resources.pak" Source="$(var.EmbeddApp_TargetDir)devtools_resources.pak" />
</Component>
<Component Id="EmbeddApp.pdb" Guid="e040e421-d4b4-4916-9089-f2efb1459594">
<File Id="EmbeddApp.pdb" Name="EmbeddApp.pdb" Source="$(var.EmbeddApp_TargetDir)EmbeddApp.pdb" />
</Component>
<Component Id="icudtl.dat" Guid="a14f1e18-8813-42c1-bad6-f40ad21d1b25">
<File Id="icudtl.dat" Name="icudtl.dat" Source="$(var.EmbeddApp_TargetDir)icudtl.dat" />
</Component>
<Component Id="libcef.dll" Guid="22493d08-ed8f-4bf3-9708-ace297e0d2d7">
<File Id="libcef.dll" Name="libcef.dll" Source="$(var.EmbeddApp_TargetDir)libcef.dll" />
</Component>
<Component Id="libEGL.dll" Guid="8ffc6d72-f929-4162-b7d4-49b8229aeb32">
<File Id="libEGL.dll" Name="libEGL.dll" Source="$(var.EmbeddApp_TargetDir)libEGL.dll" />
</Component>
<Component Id="libGLESv2.dll" Guid="8e759d91-3e4c-4a02-9ba7-6dfaf4c0fa7e">
<File Id="libGLESv2.dll" Name="libGLESv2.dll" Source="$(var.EmbeddApp_TargetDir)libGLESv2.dll" />
</Component>
<Component Id="natives_blob.bin" Guid="15c51480-6cf0-4127-a949-d899ba5a3422">
<File Id="natives_blob.bin" Name="natives_blob.bin" Source="$(var.EmbeddApp_TargetDir)natives_blob.bin" />
</Component>
<Component Id="snapshot_blob.bin" Guid="50f987cb-551e-4734-9d15-b59e0fa7f868">
<File Id="snapshot_blob.bin" Name="snapshot_blob.bin" Source="$(var.EmbeddApp_TargetDir)snapshot_blob.bin" />
</Component>
<Component Id="v8_context_snapshot.bin" Guid="492bb45e-1cdf-4ee1-992f-5479edff99e9">
<File Id="v8_context_snapshot.bin" Name="v8_context_snapshot.bin" Source="$(var.EmbeddApp_TargetDir)v8_context_snapshot.bin" />
</Component>
<!--<Component Id="data_0" Guid="b2f7d81e-587b-4e5e-835a-e29b394ae574">
<File Id="data_0" Name="data_0" Source="$(var.EmbeddApp_TargetDir)GPUCache\data_0" />
</Component>-->
</ComponentGroup>
<CustomAction Id="EXECUTE_AFTER_FINALIZE"
Execute="immediate"
Impersonate="no"
Return="asyncNoWait"
FileKey="EmbeddApp.exe"
ExeCommand="" />
<InstallExecuteSequence>
<RemoveExistingProducts Before="InstallInitialize" Overridable="yes" />
<Custom Action="EXECUTE_AFTER_FINALIZE" After="InstallFinalize">NOT Installed</Custom>
<!--<RemoveExistingProducts Overridable="yes" Sequence="1" />
<Custom Action="EXECUTE_AFTER_FINALIZE" After="InstallFinalize">NOT Installed</Custom>-->
</InstallExecuteSequence>
</Fragment>
<!--<Fragment>
<ComponentGroup Id="ProductSubComponents" Directory="FOLDER1">
<Component Id="data_0" Guid="b2f7d81e-587b-4e5e-835a-e29b394ae574">
<File Id="data_0" Name="data_0" Source="$(var.EmbeddApp_TargetDir)GPUCache\data_0" />
</Component>
</ComponentGroup>
</Fragment>-->
</Wix>

Related

Program crashes after update but works fine with clean install

I made a C# wpf program and at this point I have an update ready to release. I created an installer with the Wix Toolkit. So I can make the msi file. But when I do the upgrade from version 1.0.0.0 to 2.0.0.0 the program crashes after installation. If I first delete the c# program with version 1.0.0.0 and then install version 2.0.0.0 everything works fine. I don't know what I am doing wrong. this is my Product.wxs (my guid ids are in my program real ids):
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?define ProductVersion="3.0.0.0"?>
<?define View_TargetDir=$(var.View.TargetDir)?>
<?define UpgradeCode="GUID-ID-FOR-UPGRADE"?>
<!--
Version 1.0
<Product Id="GUID-ID-1"
Name="MIDIMACRO"
Language="1033"
Version="1.0.0.0"
Manufacturer="vanlooverenkoen"
UpgradeCode="$(var.UpgradeCode)">
-->
<!--
Version 2.0
-->
<Product Id="GUID-ID-2"
Name="MIDIMACRO"
Language="1033"
Version="$(var.ProductVersion)"
Manufacturer="vanlooverenkoen"
UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="200"
Compressed="yes"
InstallScope="perMachine" />
<Icon Id="icon.ico"
SourceFile="$(var.ProjectDir)Icon.ico" />
<Property Id="ARPPRODUCTICON"
Value="icon.ico" />
<WixVariable Id="WixUIBannerBmp"
Value="Images\installer_top-banner.bmp" />
<WixVariable Id="WixUIDialogBmp"
Value="Images\installer_background.bmp" />
<Property Id="WIXUI_INSTALLDIR"
Value="INSTALLFOLDER" />
<UI>
<UIRef Id="WixUI_InstallDir" />
<Publish Dialog="ExitDialog"
Control="Finish"
Event="DoAction"
Value="LaunchApplication">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed
</Publish>
</UI>
<MajorUpgrade Schedule="afterInstallInitialize"
DowngradeErrorMessage="A newer version of [ProductName] is already installed."/>
<MediaTemplate EmbedCab="yes" />
<Feature Id="ProductFeature" Title="MIDIMACRO" Level="1">
<ComponentGroupRef Id="ProductComponents" />
<ComponentGroupRef Id="ProgramFilesFolder_files" />
<ComponentRef Id="ApplicationShortcut" />
<ComponentRef Id="ApplicationShortcutDesktop" />
</Feature>
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Launch MIDIMACRO" />
<!-- Step 3: Include the custom action -->
<Property Id="WixShellExecTarget" Value="[INSTALLFOLDER]MIDIMACRO.exe" />
<CustomAction Id="LaunchApplication" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" />
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="MIDIMACRO" />
</Directory>
<Directory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="MIDIMACRO" />
</Directory>
<Directory Id="DesktopFolder" Name="Desktop" />
</Directory>
</Fragment>
<Fragment>
<DirectoryRef Id="ApplicationProgramsFolder">
<Component Id="ApplicationShortcut" Guid="9bd13330-6540-406f-a3a8-d7f7c69ae7f9">
<Shortcut Id="ApplicationStartMenuShortcut" Name="MIDIMACRO" Description="MIDIMACRO" Target="[INSTALLFOLDER]MIDIMACRO.exe" WorkingDirectory="INSTALLFOLDER" />
<RemoveFolder Id="RemoveApplicationProgramsFolder" Directory="ApplicationProgramsFolder" On="uninstall" />
<RegistryValue Root="HKCU" Key="Software\MIDIMACRO" Name="installed" Type="integer" Value="1" KeyPath="yes" />
</Component>
</DirectoryRef>
<DirectoryRef Id="DesktopFolder">
<Component Id="ApplicationShortcutDesktop" Guid="cde1e030-eb64-49a5-b7b8-400b379c2d1a">
<Shortcut Id="ApplicationDesktopShortcut" Name="MIDIMACRO" Description="MIDIMACRO" Target="[INSTALLFOLDER]MIDIMACRO.exe" WorkingDirectory="INSTALLFOLDER" />
<RemoveFolder Id="RemoveDesktopFolder" Directory="DesktopFolder" On="uninstall" />
<RegistryValue Root="HKCU" Key="Software\MIDIMACRO" Name="installed" Type="integer" Value="1" KeyPath="yes" />
</Component>
</DirectoryRef>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. -->
<!-- <Component Id="ProductComponent"> -->
<!-- TODO: Insert files, registry keys, and other resources here. -->
<!-- </Component> -->
<Component Id="MahApps.Metro.dll" Guid="7903f312-19fb-45a5-8dc6-9823ada4cca0">
<File Id="MahApps.Metro.dll" Name="MahApps.Metro.dll" Source="$(var.View_TargetDir)MahApps.Metro.dll" />
</Component>
<Component Id="System.Windows.Interactivity.dll" Guid="4af9d18a-6205-4b23-887c-bf31685d548e">
<File Id="System.Windows.Interactivity.dll" Name="System.Windows.Interactivity.dll" Source="$(var.View_TargetDir)System.Windows.Interactivity.dll" />
</Component>
<Component Id="Newtonsoft.Json.dll" Guid="a97d5ecb-a716-43da-bd5f-83a7be929b47">
<File Id="Newtonsoft.Json.dll" Name="Newtonsoft.Json.dll" Source="$(var.View_TargetDir)Newtonsoft.Json.dll" />
</Component>
<Component Id="Sanford.Multimedia.Midi.dll" Guid="e098aa86-d81e-48e9-84ba-4bc548e3f074">
<File Id="Sanford.Multimedia.Midi.dll" Name="Sanford.Multimedia.Midi.dll" Source="$(var.View_TargetDir)Sanford.Multimedia.Midi.dll" />
</Component>
<Component Id="Controller.dll" Guid="2d5d325c-234a-4ae4-b3fb-c87d346fccf5">
<File Id="Controller.dll" Name="Controller.dll" Source="$(var.View_TargetDir)Controller.dll" />
</Component>
<Component Id="View.exe.config" Guid="e1f88ab9-55fb-4bcc-a88c-2834c63469e6">
<File Id="View.exe.config" Name="MIDIMACRO.exe.config" Source="$(var.View_TargetDir)View.exe.config" />
</Component>
<Component Id="View.exe" Guid="7388a307-32fa-4f56-8fc6-a558de5ab7e6">
<File Id="View.exe" Name="MIDIMACRO.exe" Source="$(var.View_TargetDir)View.exe" />
</Component>
<Component Id="Model.dll" Guid="2684cc98-d124-41d4-85e6-99ecc2c7e131">
<File Id="Model.dll" Name="Model.dll" Source="$(var.View_TargetDir)Model.dll" />
</Component>
<Component Id="MaterialDesignThemes.Wpf.dll" Guid="ccbfeca9-31fe-4d5c-a31a-5a264f69fd58">
<File Id="MaterialDesignThemes.Wpf.dll" Name="MaterialDesignThemes.Wpf.dll" Source="$(var.View_TargetDir)MaterialDesignThemes.Wpf.dll" />
</Component>
<Component Id="MaterialDesignThemes.MahApps.dll" Guid="66e05999-a097-4595-bffe-99e4afef2369">
<File Id="MaterialDesignThemes.MahApps.dll" Name="MaterialDesignThemes.MahApps.dll" Source="$(var.View_TargetDir)MaterialDesignThemes.MahApps.dll" />
</Component>
<Component Id="MaterialDesignColors.dll" Guid="28ef4cb6-386f-4c82-8999-39ff3e1cde9a">
<File Id="MaterialDesignColors.dll" Name="MaterialDesignColors.dll" Source="$(var.View_TargetDir)MaterialDesignColors.dll" />
</Component>
<Component Id="WindowsInput.dll" Guid="0a28ba53-41df-42b0-b997-cc7e86a47180">
<File Id="WindowsInput.dll" Name="WindowsInput.dll" Source="$(var.View_TargetDir)WindowsInput.dll" />
</Component>
<Component Id="Hardcodet.Wpf.TaskbarNotification.dll" Guid="1f4aaa97-ed7c-4d12-ac25-d5b0ba0fb734">
<File Id="Hardcodet.Wpf.TaskbarNotification.dll" Name="Hardcodet.Wpf.TaskbarNotification.dll" Source="$(var.View_TargetDir)Hardcodet.Wpf.TaskbarNotification.dll" />
</Component>
<Component Id="CSCore.dll" Guid="6dcfcc86-12d8-42f6-a297-87560a5a3182">
<File Id="CSCore.dll" Name="CSCore.dll" Source="$(var.View_TargetDir)CSCore.dll" />
</Component>
<Component Id="MaterialDesignThemes.Wpf.pdb" Guid="9bf8b60e-6944-4e65-b2e6-35d826ffff3d">
<File Id="MaterialDesignThemes.Wpf.pdb" Name="MaterialDesignThemes.Wpf.pdb" Source="$(var.View_TargetDir)MaterialDesignThemes.Wpf.pdb" />
</Component>
<Component Id="System.Reactive.PlatformServices.dll" Guid="1e4cf4a5-ec59-41de-b42a-1de602185483">
<File Id="System.Reactive.PlatformServices.dll" Name="System.Reactive.PlatformServices.dll" Source="$(var.View_TargetDir)System.Reactive.PlatformServices.dll" />
</Component>
<Component Id="System.Reactive.Linq.dll" Guid="3253a150-0b73-4dde-902e-93ecb4f3039b">
<File Id="System.Reactive.Linq.dll" Name="System.Reactive.Linq.dll" Source="$(var.View_TargetDir)System.Reactive.Linq.dll" />
</Component>
<Component Id="System.Reactive.Interfaces.dll" Guid="02c68719-7df6-4814-ab49-c5c2660448c4">
<File Id="System.Reactive.Interfaces.dll" Name="System.Reactive.Interfaces.dll" Source="$(var.View_TargetDir)System.Reactive.Interfaces.dll" />
</Component>
<Component Id="System.Reactive.Core.dll" Guid="11757dde-fbdc-489b-8de5-2e12bbdce7c0">
<File Id="System.Reactive.Core.dll" Name="System.Reactive.Core.dll" Source="$(var.View_TargetDir)System.Reactive.Core.dll" />
</Component>
<Component Id="MaterialDesignColors.pdb" Guid="b689cffb-a71f-45a1-83cd-97e9e265d491">
<File Id="MaterialDesignColors.pdb" Name="MaterialDesignColors.pdb" Source="$(var.View_TargetDir)MaterialDesignColors.pdb" />
</Component>
<Component Id="View.pdb" Guid="d8b9af45-0c0d-4cb3-b5e2-8b2cfe3e66cf">
<File Id="View.pdb" Name="View.pdb" Source="$(var.View_TargetDir)View.pdb" />
</Component>
<Component Id="MaterialDesignThemes.MahApps.pdb" Guid="0623abd7-239e-41b3-aa8c-e0c76272eb0d">
<File Id="MaterialDesignThemes.MahApps.pdb" Name="MaterialDesignThemes.MahApps.pdb" Source="$(var.View_TargetDir)MaterialDesignThemes.MahApps.pdb" />
</Component>
<Component Id="Firebase.Database.dll" Guid="598ae72f-65e9-4b12-a88f-480e47c9f02c">
<File Id="Firebase.Database.dll" Name="Firebase.Database.dll" Source="$(var.View_TargetDir)Firebase.Database.dll" />
</Component>
<Component Id="Controller.pdb" Guid="08fa8a12-2c45-4bf8-8d68-6d036117331d">
<File Id="Controller.pdb" Name="Controller.pdb" Source="$(var.View_TargetDir)Controller.pdb" />
</Component>
<Component Id="Model.pdb" Guid="1d408632-0906-4ef1-82d8-197b7665a03a">
<File Id="Model.pdb" Name="Model.pdb" Source="$(var.View_TargetDir)Model.pdb" />
</Component>
</ComponentGroup>
</Fragment>
<Fragment>
<ComponentGroup Id="ProgramFilesFolder_files" Directory="ProgramFilesFolder">
<Component Id="resources_settings_icon.svg" Guid="7f417c29-b7f8-4282-b248-cb220436c6e0">
<File Id="resources_settings_icon.svg" Name="settings_icon.svg" Source="$(var.View_TargetDir)resources\settings_icon.svg" />
</Component>
<Component Id="resources_search_icon.svg" Guid="12291d78-6c79-4b35-9435-025a7bd4b063">
<File Id="resources_search_icon.svg" Name="search_icon.svg" Source="$(var.View_TargetDir)resources\search_icon.svg" />
</Component>
<Component Id="resources_flash_icon.svg" Guid="d84b95d6-bc6c-43d0-b7a3-15da8332cb2e">
<File Id="resources_flash_icon.svg" Name="flash_icon.svg" Source="$(var.View_TargetDir)resources\flash_icon.svg" />
</Component>
<Component Id="resources_gesture_icon.svg" Guid="3e5d81c5-7801-4fb3-9dda-4ba1fb593a87">
<File Id="resources_gesture_icon.svg" Name="gesture_icon.svg" Source="$(var.View_TargetDir)resources\gesture_icon.svg" />
</Component>
<Component Id="resources_add_circle_icon.svg" Guid="f56738c4-876a-4db3-8958-9d714450f1fa">
<File Id="resources_add_circle_icon.svg" Name="add_circle_icon.svg" Source="$(var.View_TargetDir)resources\add_circle_icon.svg" />
</Component>
</ComponentGroup>
</Fragment>
</Wix>
The most likely issue is the message in the log:
Disallowing installation of component: {CCBFECA9-31FE-4D5C-A31A-5A264F69FD58} since the same component with higher versioned keyfile exists
This implies that you did not update the file version of that Dll. The result is that the Dll is missing and your app crashes. There's a good explanation here:
https://blogs.msdn.microsoft.com/astebner/2015/11/16/why-windows-installer-removes-files-during-a-major-upgrade-if-they-go-backwards-in-version-numbers/
The basic issue is that early in the install it decides that it won't overwrite that file because the existing version on the system is greater than the "new" incoming file, so it decides not to install it at all. Those are the file version overwrite rules. However, later on the upgrade occurs that removes all the old files, but it still erroneously sticks with the idea that it shouldn't install that file, so it's missing at the end of the install.

Wix Toolset error when compiling

I am new with the Wix Toolset. I've been googling and reading tutorials. I have been tasked with taking over someone else's project and previous to this have not heard of Wix.
I am getting an error:
Unresolved reference to symbol 'WixComponentGroup:INSTALLDIR_files' in section 'Product:{C29D5782-ED4E-492C-B844-E15292A879F1}'.
Below is my FileFragment.wxs
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?define SAACA_TargetDir=$(var.SAACA.TargetDir)?>
<?define StarkBlueADFSAdapter_TargetDir=$(var.StarkBlueADFSAdapter.TargetDir)?>
<Fragment>
<DirectoryRef Id="INSTALLDIR">
<Component Id="cmpABFF5E35E84AFD4197B11DE9DF2413DD" Guid="{FA545A1A-C5FA-483B-ADB0-97FFD9D64695}">
<File Id="fil8BE63D7D0CF5F7EC0CDA9144B4383379" KeyPath="yes" Source="$(var.SourcePath)\readme.txt" />
</Component>
<Directory Id="dirA5528701EE26FFBF346CCE20EE8ACE99" Name="bin">
<Component Id="cmpB0471075A3EB855663777A0FC25896C2" Guid="{665AA658-0A65-49DE-8307-EE91BC4F063D}">
<File Id="fil2BB254C1A2D8A4E77D8C72C2103E657E" KeyPath="yes" Source="$(var.SourcePath)\bin\HtmlAgilityPack.dll" />
</Component>
<Component Id="cmp20D48B7FD0F784EDD0D4AF7FFE4454B4" Guid="{0FE55C4C-EDD4-4254-AF87-4E31EE07F1E4}">
<File Id="fil2163FF814EA3BB0870CD1DD6AB64EEA0" KeyPath="yes" Source="$(var.SourcePath)\bin\Newtonsoft.Json.dll" />
</Component>
<Component Id="cmpB8A7273E7CF8289095FD4A3D8C0F9BCB" Guid="{7A68B365-6E07-47A2-A481-BD9B2567D259}">
<File Id="fil84309E5E3F29680E7406EC4FFA96726F" KeyPath="yes" Source="$(var.SourcePath)\bin\StarkBlue.Sdk.dll" />
</Component>
<Component Id="cmp00B7D4AA03C78496A43F55741AEC459A" Guid="{9FE30795-DB22-4A5E-BB6F-52BFC7A79F9D}">
<File Id="fil5EFEB6E94B7D336827DA980F6B37514B" KeyPath="yes" Source="$(var.SourcePath)\bin\StarkBlueADFSAdapter.dll" />
</Component>
</Directory>
<Directory Id="dir93F86CB27B2DA7095C70CFE88BB9B554" Name="gac">
<Component Id="cmpC268A2F89BED517F2C8732818BB63BB2" Guid="{366F268C-C167-4A31-885D-997444435CF4}">
<File Id="fil131A7F37C2A80BD4F1ACEB1018E753FC" KeyPath="yes" Source="$(var.SourcePath)\gac\HtmlAgilityPack.dll" Assembly=".net" />
</Component>
<Component Id="cmpA2E76D3D59511C82ED3654B3325B2E32" Guid="{57589654-0D56-4F87-8583-59C310917BCC}">
<File Id="fil0E9F401EBC5DC9D9D275E5F0D0F3DE0B" KeyPath="yes" Source="$(var.SourcePath)\gac\Newtonsoft.Json.dll" Assembly=".net" />
</Component>
<Component Id="cmp13E1C8F0D7F80DA38F4F15DA5C728E31" Guid="{864ABA0B-F047-48F5-BC78-927474D1B5F7}">
<File Id="filE284DC818AD996FCC7D7808969AB2ACE" KeyPath="yes" Source="$(var.SourcePath)\gac\StarkBlueADFSAdapter.dll" Assembly=".net" />
</Component>
</Directory>
<Directory Id="dir0D7D2D8D48347B01BECC2F06E2F3CA05" Name="Html">
<Component Id="cmp5ED9631EE2A298E6BD3DFCF7A8408CC6" Guid="{296EB9EF-EA98-4F30-AB0D-37EAD3455121}">
<File Id="fil5B40AB42B6271548DC495BCD83291822" KeyPath="yes" Source="$(var.SourcePath)\Html\adapter.html" />
</Component>
</Directory>
<Directory Id="dir2F6E2DBD7872AC6D99FFD4A591D8547D" Name="Images">
<Component Id="cmp612314B611D496B7304BF6AFC2B0164F" Guid="{D16A3092-B475-44C7-A2D4-97B474751831}">
<File Id="filD7AE89AB76FE8AE18D43BDFECCF54745" KeyPath="yes" Source="$(var.SourcePath)\Images\301.GIF" />
</Component>
</Directory>
<Directory Id="dirBC02319722C77D63C381B32042A43610" Name="Logs">
<Component Id="cmp2228494C17EEAE93171D610BE3F01B67" Guid="{75C0314D-C552-48EA-B5F1-1866752E47B9}" KeyPath="yes">
<CreateFolder />
</Component>
</Directory>
<Directory Id="dir56A9BD95D908D4AE3D37F91AAC2444E9" Name="Props">
<Component Id="cmp96195594B8A71C8A6C5F9496DD9D30E5" Guid="{196324C2-5AB6-4182-8A3B-232DDB4D9AEA}">
<File Id="filB7EEC2B5C1FF1908754C768C9440CE64" KeyPath="yes" Source="$(var.SourcePath)\Props\StarkBlueProperties.txt" />
</Component>
</Directory>
</DirectoryRef>
</Fragment>
<Fragment>
<ComponentGroup Id="StarkBlueAdapter">
<ComponentRef Id="cmpABFF5E35E84AFD4197B11DE9DF2413DD" />
<ComponentRef Id="cmpB0471075A3EB855663777A0FC25896C2" />
<ComponentRef Id="cmp20D48B7FD0F784EDD0D4AF7FFE4454B4" />
<ComponentRef Id="cmpB8A7273E7CF8289095FD4A3D8C0F9BCB" />
<ComponentRef Id="cmp00B7D4AA03C78496A43F55741AEC459A" />
<ComponentRef Id="cmpC268A2F89BED517F2C8732818BB63BB2" />
<ComponentRef Id="cmpA2E76D3D59511C82ED3654B3325B2E32" />
<ComponentRef Id="cmp13E1C8F0D7F80DA38F4F15DA5C728E31" />
<ComponentRef Id="cmp5ED9631EE2A298E6BD3DFCF7A8408CC6" />
<ComponentRef Id="cmp612314B611D496B7304BF6AFC2B0164F" />
<ComponentRef Id="cmp2228494C17EEAE93171D610BE3F01B67" />
<ComponentRef Id="cmp96195594B8A71C8A6C5F9496DD9D30E5" />
</ComponentGroup>
</Fragment>
<Fragment>
<ComponentGroup Id="INSTALLDIR_files" Directory="INSTALLDIR">
<Component Id="Microsoft.Deployment.WindowsInstaller.dll" Guid="32cf1e97-fff1-4856-9399-13703f0c68dc">
<File Id="Microsoft.Deployment.WindowsInstaller.dll" Name="Microsoft.Deployment.WindowsInstaller.dll" Source="$(var.SAACA_TargetDir)Microsoft.Deployment.WindowsInstaller.dll" />
</Component>
<Component Id="Newtonsoft.Json.dll" Guid="d656bde0-aea0-42da-a6f5-d38cd57f7832">
<File Id="Newtonsoft.Json.dll" Name="Newtonsoft.Json.dll" Source="$(var.SAACA_TargetDir)Newtonsoft.Json.dll" />
</Component>
<Component Id="SAACA.dll" Guid="67ad9f71-24ca-4f98-a1cc-f40f2ba3075f">
<File Id="SAACA.dll" Name="SAACA.dll" Source="$(var.SAACA_TargetDir)SAACA.dll" />
</Component>
<Component Id="Microsoft.IdentityServer.Web.dll" Guid="73611dd3-3dfb-4dd7-9d69-a581b02417b2">
<File Id="Microsoft.IdentityServer.Web.dll" Name="Microsoft.IdentityServer.Web.dll" Source="$(var.StarkBlueADFSAdapter_TargetDir)Microsoft.IdentityServer.Web.dll" />
</Component>
<Component Id="SAACA.pdb" Guid="c647afe6-ef7e-4522-aab1-dda437279fb9">
<File Id="SAACA.pdb" Name="SAACA.pdb" Source="$(var.SAACA_TargetDir)SAACA.pdb" />
</Component>
<Component Id="CustomAction.config" Guid="f7632128-e1b1-4dcb-ae10-1f646df90147">
<File Id="CustomAction.config" Name="CustomAction.config" Source="$(var.SAACA_TargetDir)CustomAction.config" />
</Component>
<Component Id="HtmlAgilityPack.dll" Guid="308bb776-597e-4069-8ede-6a9e1107eabc">
<File Id="HtmlAgilityPack.dll" Name="HtmlAgilityPack.dll" Source="$(var.StarkBlueADFSAdapter_TargetDir)HtmlAgilityPack.dll" />
</Component>
<Component Id="StarkBlue.Sdk.dll" Guid="9276faf8-9157-4948-9134-b7eac1bc590e">
<File Id="StarkBlue.Sdk.dll" Name="StarkBlue.Sdk.dll" Source="$(var.StarkBlueADFSAdapter_TargetDir)StarkBlue.Sdk.dll" />
</Component>
<Component Id="StarkBlueADFSAdapter.pdb" Guid="ac729a7f-fe62-465e-8d49-af938698b808">
<File Id="StarkBlueADFSAdapter.pdb" Name="StarkBlueADFSAdapter.pdb" Source="$(var.StarkBlueADFSAdapter_TargetDir)StarkBlueADFSAdapter.pdb" />
</Component>
<Component Id="StarkBlueADFSAdapter.dll" Guid="6c36f588-846b-43f8-a17b-b0d58f5dd764">
<File Id="StarkBlueADFSAdapter.dll" Name="StarkBlueADFSAdapter.dll" Source="$(var.StarkBlueADFSAdapter_TargetDir)StarkBlueADFSAdapter.dll" />
</Component>
</ComponentGroup>
</Fragment>
<Fragment>
<ComponentGroup Id="Resources_Images_files" Directory="Resources_Images">
<Component Id="Resources_Images_HelpDesk.png" Guid="761b57c7-3db9-4f51-a03d-6ec1130e3184">
<File Id="Resources_Images_HelpDesk.png" Name="HelpDesk.png" Source="$(var.StarkBlueADFSAdapter_TargetDir)Resources\Images\HelpDesk.png" />
</Component>
<Component Id="Resources_Images_OATH.png" Guid="28627250-524a-4f4b-a93b-66ea7aee9edf">
<File Id="Resources_Images_OATH.png" Name="OATH.png" Source="$(var.StarkBlueADFSAdapter_TargetDir)Resources\Images\OATH.png" />
</Component>
<Component Id="Resources_Images_Email.png" Guid="9dc0d4a9-fd8e-461a-acc6-ac8e533d3814">
<File Id="Resources_Images_Email.png" Name="Email.png" Source="$(var.StarkBlueADFSAdapter_TargetDir)Resources\Images\Email.png" />
</Component>
<Component Id="Resources_Images_301.GIF" Guid="a8127906-7582-43f7-bba1-fce87a877250">
<File Id="Resources_Images_301.GIF" Name="301.GIF" Source="$(var.StarkBlueADFSAdapter_TargetDir)Resources\Images\301.GIF" />
</Component>
<Component Id="Resources_Images_KBQ.png" Guid="db5e896a-754b-4d69-8b30-eb85e499c6ff">
<File Id="Resources_Images_KBQ.png" Name="KBQ.png" Source="$(var.StarkBlueADFSAdapter_TargetDir)Resources\Images\KBQ.png" />
</Component>
<Component Id="Resources_Images_Voice.png" Guid="7f724658-a985-4066-892e-b23e7f28f10c">
<File Id="Resources_Images_Voice.png" Name="Voice.png" Source="$(var.StarkBlueADFSAdapter_TargetDir)Resources\Images\Voice.png" />
</Component>
<Component Id="Resources_Images_SMS.png" Guid="ec00ce0b-6698-46f2-a1ea-362dac803b42">
<File Id="Resources_Images_SMS.png" Name="SMS.png" Source="$(var.StarkBlueADFSAdapter_TargetDir)Resources\Images\SMS.png" />
</Component>
</ComponentGroup>
</Fragment>
<Fragment>
<ComponentGroup Id="Resources_Html_files" Directory="Resources_Html">
<Component Id="Resources_Html_adapter.html" Guid="52cf0390-370e-45cf-aead-2da6573f1c12">
<File Id="Resources_Html_adapter.html" Name="adapter.html" Source="$(var.StarkBlueADFSAdapter_TargetDir)Resources\Html\adapter.html" />
</Component>
</ComponentGroup>
</Fragment>
<Fragment>
<ComponentGroup Id="Resources_files" Directory="Resources">
<Component Id="Resources_readme.txt" Guid="98690207-02bf-4b77-ba98-eb0641f1c69a">
<File Id="Resources_readme.txt" Name="readme.txt" Source="$(var.StarkBlueADFSAdapter_TargetDir)Resources\readme.txt" />
</Component>
</ComponentGroup>
</Fragment>
<Fragment>
<ComponentGroup Id="Resources_Props_files" Directory="Resources_Props">
<Component Id="Resources_Props_StarkBlueProperties.txt" Guid="47aea511-d28d-4efd-bde4-0440ba6429c4">
<File Id="Resources_Props_StarkBlueProperties.txt" Name="StarkBlueProperties.txt" Source="$(var.StarkBlueADFSAdapter_TargetDir)Resources\Props\StarkBlueProperties.txt" />
</Component>
</ComponentGroup>
</Fragment>
</Wix>
Here is my Product.wxs
<?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:netfx="http://schemas.microsoft.com/wix/NetFxExtension">
<?define UpgradeCode="b21f4fe8-3a40-4080-9bac-22e155496c10" ?>
<?define InfoURL="https://www.StarkBlue.com/" ?>
<Product Id="{C29D5782-ED4E-492C-B844-E15292A879F1}" Name="!(loc.ApplicationName)" Language="!(loc.Language)" Version="1.0.0.0" Manufacturer="!(loc.Manufacture)" UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" InstallPrivileges="elevated" AdminImage="yes" Manufacturer="!(loc.Manufacture)" Comments="!(loc.ProductComments)" Description="!(loc.ProductDescription)" Keywords="!(loc.ProductKeywords)" />
<?include Settings.wxi?>
<WixVariable Id="WixUILicenseRtf" Value="placeholder" />
<WixVariable Id="WixUIBannerBmp" Value="Resources\BannerTop.bmp" />
<WixVariable Id="WixUIDialogBmp" Value="Resources\Dialog.bmp" />
<MajorUpgrade DowngradeErrorMessage="!(loc.NewerInstalled)" AllowSameVersionUpgrades="yes" />
<MediaTemplate EmbedCab="yes" />
<Property Id="REMADAPTERNAME" Secure="yes" />
<Property Id="REMINSTALLDIR" Secure="yes" />
<Property Id="REMISPRIMARY" Secure="yes" />
<Property Id="ARPHELPLINK" Value="$(var.InfoURL)" />
<Property Id="STOREDADAPTERNAME">
<RegistrySearch Id="ADAPTERNAME_REGSEARCH" Root="HKLM" Key="Software\StarkBlue\ADFSAdapter" Name="AdapterName" Type="raw" Win64="no" />
</Property>
<Property Id="STOREDINSTALLDIR">
<RegistrySearch Id="INSTALLDIR_REGSEARCH" Root="HKLM" Key="Software\StarkBlue\ADFSAdapter" Name="InstallDir" Type="raw" Win64="no" />
</Property>
<Property Id="STOREDISPRIMARY">
<RegistrySearch Id="ISPRIMARY_REGSEARCH" Root="HKLM" Key="Software\StarkBlue\ADFSAdapter" Name="IsPrimaryADFS" Type="raw" Win64="no" />
</Property>
<SetProperty Id="REMADAPTERNAME" Value="[STOREDADAPTERNAME]" After="AppSearch">NOT(REMADAPTERNAME)</SetProperty>
<SetProperty Id="REMINSTALLDIR" Value="[STOREDINSTALLDIR]" After="AppSearch">NOT(REMINSTALLDIR)</SetProperty>
<SetProperty Id="REMISPRIMARY" Value="[STOREDISPRIMARY]" After="AppSearch">NOT(REMISPRIMARY)</SetProperty>
<Binary Id="SAACA" SourceFile="$(var.SAACA.TargetDir)$(var.SAACA.TargetName).CA.dll" />
<CustomAction Id="PassProperties" Property="SetProperties" Value="installDir=[INSTALLDIR];enableLogs=[ENABLELOGS];managementUiFriendlyName=[MANAGEMENTUIFRIENDLYNAME];appID=[APPID];appKey=[APPKEY];StarkBlueRealmUrl=[StarkBlueREALMURL];useSamAccountName=[USESAMACCOUNTNAME];phoneimageurl=[PHONEIMAGEURL];smsimageurl=[SMSIMAGEURL];emailimageurl=[EMAILIMAGEURL];kbqimageurl=[KBQIMAGEURL];hdimageurl=[HDIMAGEURL];oathimageurl=[OATHIMAGEURL];progressgifurl=[PROGRESSGIFURL];disablessl=[DISABLESSL]" />
<CustomAction Id="SetProperties" BinaryKey="SAACA" DllEntry="SetProperties" Execute="deferred" Return="check" Impersonate="no" />
<CustomAction Id="PassAssemblyNameForReg" Property="RegisterWithADFS" Value="ASSEMBLYFULLNAME=[ASSEMBLYFULLNAME];ADAPTERNAME=[ADAPTERNAME];ISPRIMARY=[ISPRIMARY]" />
<CustomAction Id="RegisterWithADFS" BinaryKey="SAACA" DllEntry="RegisterWithADFS" Execute="deferred" Return="ignore" Impersonate="no" />
<CustomAction Id="PassAssemblyNameForUnreg" Property="UnregisterWithADFS" Value="ASSEMBLYFULLNAME=[ASSEMBLYFULLNAME];ADAPTERNAME=[STOREDADAPTERNAME];ISPRIMARY=[STOREDISPRIMARY]" />
<CustomAction Id="UnregisterWithADFS" BinaryKey="SAACA" DllEntry="UnregisterWithADFS" Execute="deferred" Return="ignore" Impersonate="no" />
<CustomAction Id="PassInstallDirToRemove" Property="RemoveExtraFilesFolders" Value="installDir=[REMINSTALLDIR]" />
<CustomAction Id="RemoveExtraFilesFolders" BinaryKey="SAACA" DllEntry="RemoveExtraFilesFolders" Execute="deferred" Return="ignore" Impersonate="no" />
<PropertyRef Id="NETFRAMEWORK45" />
<Condition Message="!(loc.DotNetFrameworkNeeded)">
<![CDATA[Installed OR NETFRAMEWORK45]]>
</Condition>
<Condition Message="!(loc.OSVersion)">
<![CDATA[Installed OR (VersionNT >= 601)]]>
</Condition>
<InstallExecuteSequence>
<InstallExecute After="MsiPublishAssemblies" />
<Custom Action="PassProperties" Before="InstallFinalize">
NOT Installed
</Custom>
<Custom Action="SetProperties" After="PassProperties">
NOT Installed
</Custom>
<Custom Action="PassAssemblyNameForReg" Before="RegisterWithADFS">
NOT INSTALLED
</Custom>
<Custom Action="RegisterWithADFS" Before="InstallFinalize">
NOT Installed
</Custom>
<Custom Action="PassAssemblyNameForUnreg" Before="RemoveRegistryValues">
Installed
</Custom>
<Custom Action="UnregisterWithADFS" Before="InstallFinalize">
Installed
</Custom>
<Custom Action="PassInstallDirToRemove" Before="RemoveRegistryValues">
Installed
</Custom>
<Custom Action="RemoveExtraFilesFolders" Before="InstallFinalize">
Installed
</Custom>
</InstallExecuteSequence>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="WindowsFolder" Name="WindowsFolder">
<Directory Id="ADFSFolder" Name="ADFS">
<Directory Id="INSTALLDIR" Name="StarkBlueAdapter">
<Component Id="SetRegSettings" Guid="7BAE916D-FE70-40B2-AD44-6D8A551643EA">
<RegistryKey Root="HKLM" Key="Software\StarkBlue\ADFSAdapter">
<RegistryValue Type="string" Name="InstallDir" Value="[INSTALLDIR]" KeyPath="yes" />
<RegistryValue Type="string" Name="AdapterName" Value="[ADAPTERNAME]" />
<RegistryValue Type="string" Name="IsPrimaryADFS" Value="[ISPRIMARY]" />
</RegistryKey>
</Component>
</Directory>
<Directory Id="Resources" Name="Resources">
<Directory Id="Resources_Html" Name="Html" />
<Directory Id="Resources_Images" Name="Images" />
<Directory Id="Resources_Props" Name="Props" />
</Directory>
</Directory>
</Directory>
</Directory>
<Feature Id="ProductFeature" Title="StarkBlue TwoFacto Adapter" Level="1" ConfigurableDirectory="INSTALLDIR">
<ComponentGroupRef Id="StarkBlueAdapter" />
<ComponentRef Id="SetRegSettings" />
<ComponentGroupRef Id="INSTALLDIR_files" />
</Feature>
<UI>
<UIRef Id="WixUI_SAUI" />
</UI>
</Product>
</Wix>
I am struggling to give myself a crash course as well as try to resolve this.

WiX Installer does not add Application to Programs and Features

I have a VB.net based WiX installer which seems to function as required in that it copies all the relevent files to the target folders on the machine, however for some reason the installer does not appear to present the application in Programs and Features. I am a relative newbie to WiX and based this WiX Installer project on a previous Windows Service project that I developed, which worked properly. Hoping someone can point out to me where I am going wrong. Code detailed below, please note all registry entries and GUIDs have been hashed-out for security purposes:
<?xml version="1.0" encoding="UTF-8"?>
<?define SourceDir = "..\..\Bin\Debug" ?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Product Id="*" Name="PSALERTSClient" Language="1033" Version="1.0.0.0" Manufacturer="Iberdrola, S.A." UpgradeCode="a6fd9179-efe6-47d1-bd8f-aec182d36c8b">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate EmbedCab="yes" />
<Feature Id="ProductFeature" Title="PSALERTS Client" Level="1">
<ComponentRef Id="cmpDirQuery" />
<ComponentRef Id="cmpDirQueryOutput" />
<ComponentRef Id="cmpQueryExe" />
<ComponentRef Id="cmpQueryPdb" />
<ComponentRef Id="cmpBusinessLogicDll" />
<ComponentRef Id="cmpBusinessLogicPdb" />
<ComponentRef Id="cmpBusinessObjectDll" />
<ComponentRef Id="cmpBusinessObjectPdb" />
<ComponentRef Id="cmpCommonDll" />
<ComponentRef Id="cmpCommonPdb" />
<ComponentRef Id="cmpDataAccessDll" />
<ComponentRef Id="cmpDataAccessPdb" />
<ComponentRef Id="cmpDPAPIHelperDll" />
<ComponentRef Id="cmpDPAPIHelperPdb" />
<ComponentRef Id="cmpLoggerDll" />
<ComponentRef Id="cmpLoggerPdb" />
<ComponentRef Id="cmpPSALERTSIni" />
<ComponentRef Id="cmpPSALERTSXltm" />
<ComponentRef Id="cmpPSALERTSUserGuideChm" />
</Feature>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="dirSPEnergyNetworks" Name="SP Energy Networks">
<!-- <Component Id="cmpDirSPEnergyNetworks" Guid="{####################################}" Transitive="yes" /> -->
<Directory Id="dirPSALERTS" Name="PSALERTS">
<!-- <Component Id="cmpDirPSALERTS" Guid="{####################################}" Transitive="yes" /> -->
<Directory Id="dirQuery" Name="Query">
<Component Id="cmpDirQuery" Guid="{####################################}" KeyPath="yes">
<CreateFolder Directory="dirQuery" />
<RemoveFile Id="PurgeQuery" Name="*.*" On="uninstall" />
<RemoveFolder Id="idDirQuery" On="uninstall" Directory="dirQuery" />
</Component>
<Directory Id="dirQueryOutput" Name="QueryOutput">
<Component Id="cmpDirQueryOutput" Guid="{####################################}">
<CreateFolder Directory="dirQueryOutput" />
<RemoveFile Id="PurgeQueryOutput" Name="*.*" On="uninstall" />
<RemoveFolder Id="idDirQueryOutputRemove" On="uninstall" Directory="dirQueryOutput" />
</Component>
</Directory>
<Component Id="cmpQueryExe" Guid="*">
<File Id="filQueryExe" KeyPath="yes" Source="$(var.SourceDir)\Query.exe" />
<RemoveRegistryKey Id="RemoveQueryRegKey" Root="HKLM" Key="####################################" Action="removeOnUninstall" />
</Component>
<Component Id="cmpQueryPdb" Guid="*">
<File Id="filQueryPdb" KeyPath="yes" Source="$(var.SourceDir)\Query.pdb" />
</Component>
<Component Id="cmpBusinessLogicDll" Guid="*">
<File Id="filBusinessLogicDll" KeyPath="yes" Source="$(var.SourceDir)\BusinessLogic.dll"/>
</Component>
<Component Id="cmpBusinessLogicPdb" Guid="*">
<File Id="filBusinessLogicPdb" KeyPath="yes" Source="$(var.SourceDir)\BusinessLogic.pdb" />
</Component>
<Component Id="cmpBusinessObjectDll" Guid="*">
<File Id="filBusinessObjectDll" KeyPath="yes" Source="$(var.SourceDir)\BusinessObject.dll" />
</Component>
<Component Id="cmpBusinessObjectPdb" Guid="*">
<File Id="filBusinessObjectPdb" KeyPath="yes" Source="$(var.SourceDir)\BusinessObject.pdb" />
</Component>
<Component Id="cmpCommonDll" Guid="*">
<File Id="filCommonDll" KeyPath="yes" Source="$(var.SourceDir)\Common.dll" />
</Component>
<Component Id="cmpCommonPdb" Guid="*">
<File Id="filCommonPdb" KeyPath="yes" Source="$(var.SourceDir)\Common.pdb" />
</Component>
<Component Id="cmpDataAccessDll" Guid="*">
<File Id="filDataAccessDll" KeyPath="yes" Source="$(var.SourceDir)\DataAccess.dll" />
</Component>
<Component Id="cmpDataAccessPdb" Guid="*">
<File Id="filDataAccessPdb" KeyPath="yes" Source="$(var.SourceDir)\DataAccess.pdb" />
</Component>
<Component Id="cmpDPAPIHelperDll" Guid="*">
<File Id="filDPAPIHelperDll" KeyPath="yes" Source="$(var.SourceDir)\DPAPIHelper.dll" />
</Component>
<Component Id="cmpDPAPIHelperPdb" Guid="*">
<File Id="filDPAPIHelperPdb" KeyPath="yes" Source="$(var.SourceDir)\DPAPIHelper.pdb" />
</Component>
<Component Id="cmpLoggerDll" Guid="*">
<File Id="filLoggerDll" KeyPath="yes" Source="$(var.SourceDir)\Logger.dll" />
</Component>
<Component Id="cmpLoggerPdb" Guid="*">
<File Id="filLoggerPdb" KeyPath="yes" Source="$(var.SourceDir)\Logger.pdb" />
</Component>
<Component Id="cmpPSALERTSIni" Guid="*">
<File Id="filPSALERTSIni" KeyPath="yes" Source="$(var.SourceDir)\PSALERTS.ini" />
</Component>
<Component Id="cmpPSALERTSXltm" Guid="*">
<File Id="filPSALERTSXltm" KeyPath="yes" Source="$(var.SourceDir)\PSALERTS.xltm" />
</Component>
<Component Id="cmpPSALERTSUserGuideChm" Guid="*">
<File Id="filPSALERTSUserGuideChm" KeyPath="yes" Source="$(var.SourceDir)\PSALERTSUserGuide.Chm" />
</Component>
</Directory>
</Directory>
</Directory>
</Directory>
</Directory>
</Fragment>
<Fragment>
</Fragment>
</Wix>
Set the ARPSYSTEMCOMPONENT to 0. You can add the following line under your < Package ... > line.
<Property Id="ARPSYSTEMCOMPONENT">0</Property>
https://msdn.microsoft.com/en-us/library/windows/desktop/aa367750(v=vs.85).aspx

Create an MSI package to run a setup file with other file attachments using WIX

I would need to create an MSI to run a setup file in silent mode.
Glancing around, I noticed that WIX should do to my case, but I can not embed in the MSI package all the files needed to install (it includes only the setup.exe file).
Place below the file's xml WIX:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="SetupAccessRT2013" Language="1033" Version="1.0.0.0" Manufacturer="" UpgradeCode="e4bcb0cc-f7a8-43b8-ac66-98e01d1e3ee4">
<Package Description='pak' InstallerVersion='200' Compressed='yes' />
<Media Id='1' Cabinet='setup.cab' EmbedCab='yes' />
</Product>
<Fragment>
<DirectoryRef Id="TARGETDIR">
<Directory Id="TempFolder">
<Directory Id="INSTALLLOCATION" Name="~_tmpdir">
<Directory Id="dirBC3E512250E74A98BACAB570B3DD87D7" Name="AccessRT2013silent">
<Component Id="cmpD761E74C0DA72236640BD071EC999550" Guid="{F42E878A-DF6D-49C2-B3B8-24C5A72EEB27}">
<File Id="fil1804F4AC5510C5DC18870FAAD2A8A47D" Source="C:\AccessRT2013silent\autorun.inf" />
<File Id="filA0D99F0F2E3A44845E905E1E0058139E" Source="C:\AccessRT2013silent\Config.XML" />
<File Id="filBFD7DBA2331ABC3318C55567EEB72E50" Source="C:\AccessRT2013silent\readme.htm" />
<File Id="filC632F72A53EB8D7F3087893644411FAC" Source="C:\AccessRT2013silent\setup.dll" />
<File Id="filB20574B529F8E6C6D5BB712F8548F31B" Source="C:\AccessRT2013silent\setup.exe" />
</Component>
<Directory Id="dirD81488680DB588FD1907E8F902719D35" Name="accessrt.it-it">
<Component Id="cmp7B135F7920D368786218584715620FA0" Guid="{C7C1658D-9191-484A-B05D-4867EF0480F8}">
<File Id="filE95BAC2624D33FA0D67C2F4FF60D0AB5" Source="C:\AccessRT2013silent\accessrt.it-it\accessrtmui.msi" />
<File Id="fil123E12F79D36C0517F12EC443E675BF2" Source="C:\AccessRT2013silent\accessrt.it-it\accessrtmui.xml" />
<File Id="filE4382BD8850A3C4C239BE2BC6FEF84BB" Source="C:\AccessRT2013silent\accessrt.it-it\accrtlr.cab" />
<File Id="filE8A8CF1A02A8D2993C7B2FF3C5406688" Source="C:\AccessRT2013silent\accessrt.it-it\setup.xml" />
</Component>
</Directory>
<Directory Id="dirA2E4541D4880B837EF8E04848567D0B8" Name="accessrt.ww">
<Component Id="cmpBC53101B6EC49831C6BC88BDE95A11D9" Guid="{E8427412-57C0-42B1-96E1-BD5F06B56E74}">
<File Id="fil2357E5DF3FEAACAEE875A4C12C9FD6AB" Source="C:\AccessRT2013silent\accessrt.ww\accessrt.cab" />
<File Id="fil14B06E6CDD9832291B73228DA6C02F88" Source="C:\AccessRT2013silent\accessrt.ww\accessrt.msi" />
<File Id="filC8C91E8D9B3F96013D6FB37486ED3375" Source="C:\AccessRT2013silent\accessrt.ww\accessrt.xml" />
<File Id="fil3B693F9063FCA849825BCB0E3D23C64D" Source="C:\AccessRT2013silent\accessrt.ww\accessrtww.xml" />
<File Id="fil14432AEAA72B0EBD5451E94172A3E6D8" Source="C:\AccessRT2013silent\accessrt.ww\office64ww.msi" />
<File Id="fil83105F964A9B7E9531D023A54E3CAE74" Source="C:\AccessRT2013silent\accessrt.ww\office64ww.xml" />
<File Id="filCC537369EB4A1128FE2BAE1FD266B556" Source="C:\AccessRT2013silent\accessrt.ww\ose.exe" />
<File Id="fil13B561811753D473CE5C7C073BA1AD78" Source="C:\AccessRT2013silent\accessrt.ww\osetup.dll" />
<File Id="fil1CA8D5B548CE5CAA32BE21BD9E95B7BC" Source="C:\AccessRT2013silent\accessrt.ww\owow64ww.cab" />
<File Id="fil7D37CDD5398F4B53E2AC6BCDEA7AF6FA" Source="C:\AccessRT2013silent\accessrt.ww\pidgenx.dll" />
<File Id="filD2099F50C0355ABE9F4A979286432989" Source="C:\AccessRT2013silent\accessrt.ww\pkeyconfig-office.xrm-ms" />
<File Id="filD340F0F71D625B8F9CA44DA4589BB126" Source="C:\AccessRT2013silent\accessrt.ww\setup.xml" />
</Component>
</Directory>
<Directory Id="dir64B9E38E4D4A9D2F10B204431209FED0" Name="catalog">
<Component Id="cmp68E05D43C17F3731AF28B3A313CB7FFE" Guid="{6B583FE6-C53F-4184-BAE6-25C4DDC8DC1D}">
<File Id="filD34937D9FBDB8FEA9D90EAFD8F9659B1" Source="C:\AccessRT2013silent\catalog\files15.cat" />
</Component>
</Directory>
<Directory Id="dirB5A17BED548E019D6FC35907941C567B" Name="office.it-it">
<Component Id="cmp7A2B708BBAA3333F61474D42F505D477" Guid="{78AF3691-DF2C-4093-82C2-1A3A84CE00BE}">
<File Id="fil584C88D5876BD88EDED385EF2C8E714E" Source="C:\AccessRT2013silent\office.it-it\branding.xml" />
<File Id="fil081ECC2A6BCE9D9CC7E263DA68445E4E" Source="C:\AccessRT2013silent\office.it-it\officelr.cab" />
<File Id="filC4ECA87470C944F5010BEBE14F171861" Source="C:\AccessRT2013silent\office.it-it\officemui.msi" />
<File Id="filD90D9E08B5B9CE2B78D0838EA8E6C2CE" Source="C:\AccessRT2013silent\office.it-it\officemui.xml" />
<File Id="fil950EFBCD753783771D8CD2169597A10C" Source="C:\AccessRT2013silent\office.it-it\osetupui.dll" />
<File Id="filBF8E8C3BBA6882AAFF4A39D9EA4097C5" Source="C:\AccessRT2013silent\office.it-it\pss10r.chm" />
<File Id="fil8566B0F88EE45334F0E45540967B8153" Source="C:\AccessRT2013silent\office.it-it\setup.chm" />
<File Id="filED57A5D2C1D850B757404D0E4F561446" Source="C:\AccessRT2013silent\office.it-it\setup.xml" />
<File Id="filBA8902E75FC86E6CD530EEBDE105DABF" Source="C:\AccessRT2013silent\office.it-it\shellui.mst" />
</Component>
</Directory>
<Directory Id="dirA6B1FEC7FD17EC82D7CFF3EBC7ABAB89" Name="office64.it-it">
<Component Id="cmpF6F336FD773C599549FB87C2F1BBBA48" Guid="{EFFE139C-F418-49F4-9F88-7C8B59970724}">
<File Id="fil4BEBA1AEAFB4A46321114AC36C9423A5" Source="C:\AccessRT2013silent\office64.it-it\office64mui.msi" />
<File Id="filFBEE6C1441CDF4BE6B19DF825CA881BB" Source="C:\AccessRT2013silent\office64.it-it\office64mui.xml" />
<File Id="fil8FCBDEC21D69D2B3FEACA6364DFF98EC" Source="C:\AccessRT2013silent\office64.it-it\owow64lr.cab" />
<File Id="filCAD94331BB99F7FFD85D5447B93A9286" Source="C:\AccessRT2013silent\office64.it-it\setup.xml" />
</Component>
</Directory>
<Directory Id="dir98F696A3A7E255FF20FD4486771EA3EB" Name="updates">
<Component Id="cmp7228C5A67608A940FD38EFA9265C004A" Guid="{DC337124-8D1C-4C83-9E56-46C43F292C7E}">
<File Id="filFC219EA21604C0398FDD48D4F13D674B" Source="C:\AccessRT2013silent\updates\readme.txt" />
</Component>
</Directory>
</Directory>
</Directory>
</Directory>
</DirectoryRef>
</Fragment>
<Fragment>
<Feature Id='InstallFeature' Title='Install Feature' Level='1'>
<ComponentRef Id="cmpD761E74C0DA72236640BD071EC999550" />
<ComponentRef Id="cmp7B135F7920D368786218584715620FA0" />
<ComponentRef Id="cmpBC53101B6EC49831C6BC88BDE95A11D9" />
<ComponentRef Id="cmp68E05D43C17F3731AF28B3A313CB7FFE" />
<ComponentRef Id="cmp7A2B708BBAA3333F61474D42F505D477" />
<ComponentRef Id="cmpF6F336FD773C599549FB87C2F1BBBA48" />
<ComponentRef Id="cmp7228C5A67608A940FD38EFA9265C004A" />
</Feature>
<!-- Run Action -->
<CustomAction Id="RunWrapExe" Return="check" Execute="deferred" FileKey="filB20574B529F8E6C6D5BB712F8548F31B"
ExeCommand="setup.exe /CONFIG Config.XML" HideTarget="yes" Impersonate="no" />
<InstallExecuteSequence>
<Custom Action="RunWrapExe" After="InstallFiles">NOT REMOVE~="ALL"</Custom>
</InstallExecuteSequence>
</Fragment>
</Wix>
how should I do?
I solved it this way:
<Directory Id='TARGETDIR' Name='SourceDir'>
<Component Id='MainExecutable' Guid='*'>
</Component>
</Directory>
<Feature Id='Complete' Level='1'>
<ComponentRef Id='MainExecutable' />
</Feature>
<Binary Id="Access.exe" SourceFile="C:\AccessRuntime_x86_it-it.exe"/>
<CustomAction Id="LaunchFile" BinaryKey="Access.exe" ExeCommand="" Execute='deferred' Return='asyncNoWait' Impersonate='no'/>
<InstallExecuteSequence>
<Custom Action='LaunchFile' Before='InstallFinalize'/>
</InstallExecuteSequence>
the problem is that I would just start the exe file without installing our package MSI. How should I do?

Replacing unversioned files in WiX major upgrade

Okay, further examination and experimentation is showing that the problematic file, the pathwaysMdf file, IS being installed! However, after being installed, it's being REMOVED, by a RemoveFiles action!
I imagine it's doing this because that file is part of the original install, so it's doing it's job uninstalling and cleaning up. ARGH! What can I do?!
I am still having this problem. This is the closest I have come to a solution that works, and yet it doesn't quite work. Here is (most of) the code:
<Product Id='$(var.ProductCode)'
UpgradeCode='$(var.UpgradeCode)'
Name="Pathways"
Version='$(var.ProductVersion)'
Manufacturer='$(var.Manufacturer)'
Language='1033'>
<Package Id="*"
Description="Pathways Directory Software"
InstallerVersion="301"
Compressed="yes" />
<WixVariable Id="WixUILicenseRtf" Value="License.rtf" />
<Media Id="1" Cabinet="Pathways.cab" EmbedCab="yes" />
<Upgrade Id="$(var.UpgradeCode)">
<UpgradeVersion
OnlyDetect="no"
Maximum="$(var.ProductVersion)"
IncludeMaximum="no"
Language="1033"
Property="OLDAPPFOUND"
/>
<UpgradeVersion
Minimum="$(var.ProductVersion)"
IncludeMinimum="yes"
OnlyDetect="yes"
Language="1033"
Property="NEWAPPFOUND"
/>
</Upgrade>
<!-- directories -->
<Directory Id="TARGETDIR" Name="SourceDir">
<!-- program files directory -->
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLDIR" Name="Pathways"/>
</Directory>
<!-- application data directory -->
<Directory Id="CommonAppDataFolder" Name="CommonAppData">
<Directory Id="CommonAppDataPathways" Name="Pathways" />
</Directory>
<!-- start menu program directory -->
<Directory Id="ProgramMenuFolder">
<Directory Id="ProgramsMenuPathwaysFolder" Name="Pathways" />
</Directory>
<!-- desktop directory -->
<Directory Id="DesktopFolder" />
</Directory>
<Icon Id="PathwaysIcon" SourceFile="\\Fileserver\Release\Pathways\Latest\Release\Pathways.exe" />
<!-- components in the reference to the install directory -->
<DirectoryRef Id="INSTALLDIR">
<Component Id="Application" Guid="EEE4EB55-A515-4872-A4A5-06D6AB4A06A6">
<File Id="pathwaysExe" Name="Pathways.exe" DiskId="1" Source="\\Fileserver\Release\Pathways\Latest\Release\Pathways.exe" Vital="yes" KeyPath="yes" Assembly=".net" AssemblyApplication="pathwaysExe" AssemblyManifest="pathwaysExe" />
<File Id="pathwaysChm" Name="Pathways.chm" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\Pathways.chm" />
<File Id="publicKeyXml" ShortName="RSAPUBLI.XML" Name="RSAPublicKey.xml" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\RSAPublicKey.xml" Vital="yes" />
<File Id="staticListsXml" ShortName="STATICLI.XML" Name="StaticLists.xml" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\StaticLists.xml" Vital="yes" />
<File Id="axInteropMapPointDll" ShortName="AXMPOINT.DLL" Name="AxInterop.MapPoint.dll" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\AxInterop.MapPoint.dll" Vital="yes" />
<File Id="interopMapPointDll" ShortName="INMPOINT.DLL" Name="Interop.MapPoint.dll" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\Interop.MapPoint.dll" Vital="yes" />
<File Id="mapPointDll" ShortName="MAPPOINT.DLL" Name="MapPoint.dll" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\Interop.MapPoint.dll" Vital="yes" />
<File Id="devExpressData63Dll" ShortName="DAAT63.DLL" Name="DevExpress.Data.v6.3.dll" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\DevExpress.Data.v6.3.dll" Vital="yes" />
<File Id="devExpressUtils63Dll" ShortName="UTILS63.DLL" Name="DevExpress.Utils.v6.3.dll" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\DevExpress.Utils.v6.3.dll" Vital="yes" />
<File Id="devExpressXtraBars63Dll" ShortName="BARS63.DLL" Name="DevExpress.XtraBars.v6.3.dll" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\DevExpress.XtraBars.v6.3.dll" Vital="yes" />
<File Id="devExpressXtraNavBar63Dll" ShortName="NAVBAR63.DLL" Name="DevExpress.XtraNavBar.v6.3.dll" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\DevExpress.XtraNavBar.v6.3.dll" Vital="yes" />
<File Id="devExpressXtraCharts63Dll" ShortName="CHARTS63.DLL" Name="DevExpress.XtraCharts.v6.3.dll" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\DevExpress.XtraCharts.v6.3.dll" Vital="yes" />
<File Id="devExpressXtraEditors63Dll" ShortName="EDITOR63.DLL" Name="DevExpress.XtraEditors.v6.3.dll" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\DevExpress.XtraEditors.v6.3.dll" Vital="yes" />
<File Id="devExpressXtraPrinting63Dll" ShortName="PRINT63.DLL" Name="DevExpress.XtraPrinting.v6.3.dll" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\DevExpress.XtraPrinting.v6.3.dll" Vital="yes" />
<File Id="devExpressXtraReports63Dll" ShortName="REPORT63.DLL" Name="DevExpress.XtraReports.v6.3.dll" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\DevExpress.XtraReports.v6.3.dll" Vital="yes" />
<File Id="devExpressXtraRichTextEdit63Dll" ShortName="RICHTE63.DLL" Name="DevExpress.XtraRichTextEdit.v6.3.dll" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\DevExpress.XtraRichTextEdit.v6.3.dll" Vital="yes" />
<RegistryValue Id="PathwaysInstallDir" Root="HKLM" Key="Software\Tribal Data Resources\Pathways" Name="InstallDir" Action="write" Type="string" Value="[INSTALLDIR]" />
</Component>
</DirectoryRef>
<!-- application data components -->
<DirectoryRef Id="CommonAppDataPathways">
<Component Id="CommonAppDataPathwaysFolderComponent" Guid="087C6F14-E87E-4B57-A7FA-C03FC8488E0D">
<CreateFolder>
<Permission User="Everyone" GenericAll="yes" />
</CreateFolder>
<RemoveFolder Id="CommonAppDataPathways" On="uninstall" />
<!-- <RegistryValue Root="HKCU" Key="Software\TDR\Pathways" Name="installed" Type="integer" Value="1" KeyPath="yes" />-->
</Component>
<Component Id="Settings" Guid="A3513208-4F12-4496-B609-197812B4A953" NeverOverwrite="yes">
<File Id="settingsXml" KeyPath="yes" ShortName="SETTINGS.XML" Name="Settings.xml" DiskId="1" Source="\\fileserver\Release\Pathways\Dependencies\Settings\settings.xml" Vital="yes" />
</Component>
<Component Id="Database" Guid="1D8756EF-FD6C-49BC-8400-299492E8C65D">
<!--<RegistryValue Root="HKLM" Key="Software\TDR\Pathways\Database" Name="installed" Type="integer" Value="1" KeyPath="yes" />-->
<File Id="pathwaysMdf" CompanionFile="pathwaysExe" Name="Pathways.mdf" DiskId="1" Source="\\fileserver\Shared\Databases\Pathways\SystemDBs\Pathways.mdf" Vital="yes"/>
<File Id="pathwaysLdf" CompanionFile="pathwaysExe" Name="Pathways_log.ldf" DiskId="1" Source="\\fileserver\Shared\Databases\Pathways\SystemDBs\Pathways.ldf" Vital="yes"/>
</Component>
</DirectoryRef>
<!-- shortcut components -->
<DirectoryRef Id="DesktopFolder">
<Component Id="DesktopShortcutComponent" Guid="1BF412BA-9C6B-460D-80ED-8388AC66703F">
<Shortcut Id="DesktopShortcut"
Target="[INSTALLDIR]Pathways.exe"
Name="Pathways"
Description="Pathways Tribal Directory"
Icon="PathwaysIcon"
Show="normal"
WorkingDirectory="INSTALLDIR" />
<RegistryValue Root="HKCU" Key="Software\TDR\Pathways" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</DirectoryRef>
<DirectoryRef Id ="ProgramsMenuPathwaysFolder">
<Component Id="ProgramsMenuShortcutComponent" Guid="83A18245-4C22-4CDC-94E0-B480F80A407D">
<Shortcut Id="ProgramsMenuShortcut" Target="[INSTALLDIR]Pathways.exe" Name="Pathways" Icon="PathwaysIcon" Show="normal" WorkingDirectory="INSTALLDIR" />
<RemoveFolder Id="ProgramsMenuPathwaysFolder" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\TDR\Pathways" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</DirectoryRef>
<Feature Id="App" Title="Pathways Application" Level="1" Description="Pathways software" Display="expand" ConfigurableDirectory="INSTALLDIR" Absent="disallow" AllowAdvertise="no" InstallDefault="local">
<ComponentRef Id="Application" />
<ComponentRef Id="CommonAppDataPathwaysFolderComponent" />
<ComponentRef Id="Settings"/>
<ComponentRef Id="ProgramsMenuShortcutComponent" />
<Feature Id="Shortcuts" Title="Desktop Shortcut" Level="1" Absent="allow" AllowAdvertise="no" InstallDefault="local">
<ComponentRef Id="DesktopShortcutComponent" />
</Feature>
</Feature>
<Feature Id="Data" Title="Database" Level="1" Absent="allow" AllowAdvertise="no" InstallDefault="local">
<ComponentRef Id="Database" />
<!--<ComponentRef Id="MDF"/>
<ComponentRef Id="LDF"/>-->
</Feature>
<UIRef Id ="WixUI_FeatureTree"/>
<UIRef Id="WixUI_ErrorProgressText"/>
<UI>
<Error Id="2000">There is a later version of this program installed.</Error>
</UI>
<CustomAction Id="NewerVersionDetected" Error="2000" />
<InstallExecuteSequence>
<RemoveExistingProducts After="InstallFinalize"/>
</InstallExecuteSequence>
</Product>
The problem I am having is that I need the two files in the Database component to replace the previous copies. Since these files are unversioned, I have attempted to use the CompanionFile tag set to the PathwaysExe since that is the main executable of the application, and it IS being updated, even if the log says it isn't! The strangest thing about this is that the PathwaysLdf file IS BEING UPDATED CORRECTLY, and the PathwaysMdf file IS NOT. The log seems to indicate that the "Existing file is of an equal version (Checked using version of companion)". This is very strange because that file is being replaced just fine.
The only idea I have left is that this problem has to do with the install sequence, and I'm not sure how to proceed! I have the InstallExecuteSequence set like I do because of the SettingsXml file, and my need to NOT overwrite that file, which is actually working now, so whatever solution works for the database files can't break the working settings file!
The full log is located at:
http://pastebin.com/HFiGKuKN
Try early scheduling of RemoveExistingProducts, instead of late scheduling and you should be OK.
<RemoveExistingProducts After="InstallInitialize" />