MSi installation Error - wix

have created MSI using Wix. When I am trying to install it, I am getting the below error.
"The installer has insufficient privileges to access this directory c:\programfiles\AppTest.The installation can not continue log on as administrator or contact your system administrator".
I went through some of similar post but it did not helped me.Below in my code.
<?xml version='1.0'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
<Product Name='AppTest' Id='*'enter code here
UpgradeCode='{05E35D34-E7F6-4CED-BF86-B1747AE92E07}'
Language='1033' Codepage='1252'
Version='2.0.0.1'
Manufacturer='LabView Inc' >
<Package Id='*'
Languages='1033'
SummaryCodepage='1252'
AdminImage='no'
InstallerVersion='200'
InstallPrivileges='elevated'
Compressed='yes'
ReadOnly='yes'
ShortNames='yes'
Comments='AppTest Installer Package'
Description='AppTest Installer Package'
Manufacturer='LabView Inc' />
<Media Id='1' Cabinet='AppTest.cab' EmbedCab='yes' />
<!--Directory structure-->
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='ProgramFilesFolder'>
<Directory Id="APPLICATIONROOTDIRECTORY" Name="AppTest"/>
</Directory>
</Directory>
<!-- Adding Components-->
<DirectoryRef Id="TARGETDIR">
<Component Id="AppTest.dll" Guid="3947344C-8116-48FB-9F8A-080EA7D1ABAD">
<File Id="AppTest.dll" Source="$(sys.CURRENTDIR)files\AppTest.dll" KeyPath="yes" Checksum="yes"/>
<File Id="msvcp80.dll" Source="$(sys.CURRENTDIR)files\msvcp80.dll" />
<File Id="atl80.dll" Source="$(sys.CURRENTDIR)files\atl80.dll" />
<File Id="msvcr80.dll" Source="$(sys.CURRENTDIR)files\msvcr80.dll" />
<File Id="Microsoft.VC80.ATL.manifes" Source="$(sys.CURRENTDIR)files\Microsoft.VC80.ATL.manifest" />
<File Id="Microsoft.VC80.CRT.manifest" Source="$(sys.CURRENTDIR)files\Microsoft.VC80.CRT.manifest" />
<File Id="AppTest.inf" ReadOnly="yes" Source="$(sys.CURRENTDIR)files\AppTest.inf" />
</Component>
</DirectoryRef>
<Feature Id="AppTestFeature" Title="AppTest" Level="1">
<ComponentRef Id="AppTest.dll" />
</Feature>
</Product>

You should remove <CreateFolder Directory='AppTest' /> and change code to this:
<DirectoryRef Id="APPLICATIONROOTDIRECTORY"> <!-- main folder ur app -->
<Component Id="AppTest.dll" Guid="3947344C-8116-48FB-9F8A-080EA7D1ABAD">
<File Id="AppTest.dll" Source="$(sys.CURRENTDIR)files\AppTest.dll" KeyPath="yes" Checksum="yes"/>
<File Id="msvcp80.dll" Source="$(sys.CURRENTDIR)files\msvcp80.dll" />
<File Id="atl80.dll" Source="$(sys.CURRENTDIR)files\atl80.dll" />
<File Id="msvcr80.dll" Source="$(sys.CURRENTDIR)files\msvcr80.dll" />
<File Id="Microsoft.VC80.ATL.manifes" Source="$(sys.CURRENTDIR)files\Microsoft.VC80.ATL.manifest" />
<File Id="Microsoft.VC80.CRT.manifest" Source="$(sys.CURRENTDIR)files\Microsoft.VC80.CRT.manifest" />
<File Id="AppTest.inf" ReadOnly="yes" Source="$(sys.CURRENTDIR)files\AppTest.inf" />
</Component>
</DirectoryRef>

Related

32/64 bit WiX Combined Installer-Copying files only

I have an msi that copies files (PLC Code) to a directory(C:\Product\3.1\Boot), and modifies one key.
My visual studio project generates different PLC Code for the different architectures, but the destination is the same on both platforms. They key is in a different spot.
I have looked at using the arch-switch and conditional statements, but these look to only detect the architecture on which it is compiled, and not where the msi is run.
I know that you cant have 32/64 in the same MSI, but I'm not doing anything other than copying files and changing registries. I'm not putting anything in the windows directories/program files.
Though I would like it to appear with a version in the list of programs.
Is it possible in this case to have one installer?
Code
'''
<Product Id="*"
Name="Company"
Language="1033"
Version="4.09"
Manufacturer="CompanyInc."
UpgradeCode="YOUR_GUID"
>
<Package Id ="*"
InstallerVersion="200"
InstallPrivileges="elevated"
Compressed="yes"
InstallScope="perMachine"
Description="Company PLC Code"
Manufacturer="CompanyInc."
Keywords="PLC"
Comments="F"
/>
<!--Upgrade/install control-->
<MajorUpgrade
AllowDowngrades="yes"
/>
<!--GUI for install display-->
<UI>
<UIRef Id="WixUI_Minimal" /> <!--Define type of UI -->
</UI>
<Upgrade Id="GUID_HERE">
<UpgradeVersion OnlyDetect="no"
Property="SELFFOUND"
Minimum="1.0"
/>
</Upgrade>
<MediaTemplate EmbedCab="yes" />
<!-- Set the icon used in the programs and features list-->
<Icon Id='ProductIcon' SourceFile='Company.ico' />
<Property Id='ARPPRODUCTICON' Value='ProductIcon' />
<!-- Things to install-->
<Feature Id="Default" Title="PLC Code" Level="1">
<ComponentGroupRef Id="ProductComponentsx64" />
</Feature>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="Company PLC" />
<Directory Id="BOOTDIR" />
<Directory Id="PLCDIR" />
</Directory>
</Directory>
<SetDirectory Id="BOOTDIR" Value="C:\CompanySoftware\3.1\Boot" />
<SetDirectory Id="PLCDIR" Value="C:\CompanySoftware\3.1\Boot\Plc" />
<!--Specify when actions occur actions during install-->
<InstallExecuteSequence>
<Custom Action="ARCHIVEBOOTDIR" After ="CostFinalize" />
<!--ToDo: copy files-->
</InstallExecuteSequence>
</Product>
<Fragment>
<!--64 bit systems: Place files in appropriate directories and modify registry key for Company to autostart -->
<ComponentGroup Id="ProductComponentsx64">
<Component Id="BootComponents" Guid="" Directory="BOOTDIR">
<File Id="CurrentConfig.xml" Source="..\_Boot\CompanySoftware RT (x64)\CurrentConfig.xml" KeyPath="no" />
</Component>
<Component Id="PLCComponent" Guid="" Directory="PLCDIR">
<File Id="Port_851.app" Source="..\_Boot\CompanySoftware RT (x64)\Plc\Port_851.app" KeyPath="no" />
<File Id="Port_851.autostart" Source="..\_Boot\CompanySoftware RT (x64)\Plc\Port_851.autostart" KeyPath="no" />
<File Id="Port_851.cid" Source="..\_Boot\CompanySoftware RT (x64)\Plc\Port_851.cid" KeyPath="no" />
<File Id="Port_851.crc" Source="..\_Boot\CompanySoftware RT (x64)\Plc\Port_851.crc" KeyPath="no" />
<File Id="Port_851.occ" Source="..\_Boot\CompanySoftware RT (x64)\Plc\Port_851.occ" KeyPath="no" />
<File Id="Port_851.ocm" Source="..\_Boot\CompanySoftware RT (x64)\Plc\Port_851.ocm" KeyPath="no" />
<File Id="Port_851_boot.tizip" Source="..\_Boot\CompanySoftware RT (x64)\Plc\Port_851_boot.tizip" KeyPath="no" />
</Component>
<Component Id="StartupReg" Guid="" Directory="TARGETDIR">
<RegistryKey Root="HKLM"
Key="Software\WOW6432Node\Company\CompanySoftware3\System">
<RegistryValue Name="SysStartupState"
Type="integer"
Value ="5"/>
</RegistryKey>
</Component>
</ComponentGroup>
</Fragment>
<Fragment>
<!--32 bit systems: Place files in appropriate directories and modify registry key for Company to autostart -->
<ComponentGroup Id="ProductComponentsx86">
<Component Id="BootComponents" Guid="" Directory="BOOTDIR">
<File Id="CurrentConfig.xml" Source="..\_Boot\CompanySoftware RT (x86)\CurrentConfig.xml" KeyPath="no" />
<File Id="Company.ico" Source="Company.ico" KeyPath="no" />
</Component>
<Component Id="PLCComponent" Guid="" Directory="PLCDIR">
<File Id="Port_851.app" Source="..\_Boot\CompanySoftware RT (x86)\Plc\Port_851.app" KeyPath="no" />
<File Id="Port_851.autostart" Source="..\_Boot\CompanySoftware RT (x86)\Plc\Port_851.autostart" KeyPath="no" />
<File Id="Port_851.cid" Source="..\_Boot\CompanySoftware RT (x86)\Plc\Port_851.cid" KeyPath="no" />
<File Id="Port_851.crc" Source="..\_Boot\CompanySoftware RT (x86)\Plc\Port_851.crc" KeyPath="no" />
<File Id="Port_851.occ" Source="..\_Boot\CompanySoftware RT (x86)\Plc\Port_851.occ" KeyPath="no" />
<File Id="Port_851.ocm" Source="..\_Boot\CompanySoftware RT (x86)\Plc\Port_851.ocm" KeyPath="no" />
<File Id="Port_851_boot.tizip" Source="..\_Boot\CompanySoftware RT (x86)\Plc\Port_851_boot.tizip" KeyPath="no" />
</Component>
<Component Id="StartupReg" Guid="" Directory="TARGETDIR">
<RegistryKey Root="HKLM"
Key="Software\Company\CompanySoftware3\System">
<RegistryValue Name="SysStartupState"
Type="integer"
Value ="5"/>
</RegistryKey>
</Component>
</ComponentGroup>
</Fragment>
'''
I was able to figure out how to get this to work. By using the Condition and ![CDATA[NOT(VersionNT64)]] to detect the version I was able to perform different actions!
<Product Id="*"
Name="Company PLC"
Language="1033"
Version="4.09"
Manufacturer="Company Inc."
UpgradeCode="Code"
>
<Package Id ="*"
InstallerVersion="200"
InstallPrivileges="elevated"
Compressed="yes"
InstallScope="perMachine"
Description="Company CompanySoftware PLC Code"
Manufacturer="Company Inc."
Keywords="PLC"
Comments="Company "
/>
<!--Upgrade/install control-->
<MajorUpgrade
AllowDowngrades="yes"
/>
<!--GUI for install display-->
<!-- future use for custom graphics on the MSI pages
<WixVariable Id="WixUIBannerBmp" Value="CompanyWixUIBanner.bmp" />
<WixVariable Id="WixUIDialogBmp" Value="CompanyWixUIBanner.bmp" />
-->
<UI>
<UIRef Id="WixUI_Minimal" />
<!--Define type of UI -->
</UI>
<Upgrade Id="CODE">
<UpgradeVersion OnlyDetect="no"
Property="SELFFOUND"
Minimum="1.0"
/>
</Upgrade>
<MediaTemplate EmbedCab="yes" />
<!-- Set the icon used in the Windows programs and features list-->
<Icon Id='ProductIcon' SourceFile='Company.ico' />
<Property Id='ARPPRODUCTICON' Value='ProductIcon' />
<!-- Things to install- This would normally appear as the selectable list of items to install in a regular installer-->
<Feature Id="Default_x64" Title="PLC Code x64" Level="1">
<Condition Level ="1">
<![CDATA[(VersionNT64)]]>
</Condition>
<ComponentGroupRef Id="ProductComponentsx64" />
</Feature>
<Feature Id="Default_x86" Title="PLC Code x86" Level="1">
<Condition Level ="1">
<![CDATA[NOT(VersionNT64)]]>
</Condition>
<ComponentGroupRef Id="ProductComponentsx86" />
</Feature>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="Company PLC" />
<Directory Id="BOOTDIR" />
<Directory Id="PLCDIR" />
</Directory>
</Directory>
<SetDirectory Id="BOOTDIR" Value="C:\CompanySoftware\3.1\Boot" />
<SetDirectory Id="PLCDIR" Value="C:\CompanySoftware\3.1\Boot\Plc" />
</Product>
<Fragment>
<!--64 bit systems: Place files in appropriate directories and modify registry key for Company to autostart -->
<ComponentGroup Id="ProductComponentsx64">
<Component Id="BootComponentsx64" Guid="" Directory="BOOTDIR">
<Condition>
<![CDATA[(VersionNT64)]]>
</Condition>
<File Id="CurrentConfig.xml.x64" Source="..\_Boot\CompanySoftware RT (x64)\CurrentConfig.xml" KeyPath="no" />
</Component>
<Component Id="PLCComponent.x64" Guid="" Directory="PLCDIR">
<Condition>
<![CDATA[(VersionNT64)]]>
</Condition>
<File Id="Port_851.app.x64" Source="..\_Boot\CompanySoftware RT (x64)\Plc\Port_851.app" KeyPath="no" />
</Component>
<Component Id="StartupReg.x64" Guid="" Directory="TARGETDIR">
<Condition>
<![CDATA[(VersionNT64)]]>
</Condition>
<RegistryKey Root="HKLM"
Key="Software\WOW6432Node\Company\CompanySoftware\System">
<RegistryValue Name="SysStartupState"
Type="integer"
Value ="5"/>
</RegistryKey>
</Component>
</ComponentGroup>
</Fragment>
<Fragment>
<!--32 bit systems: Place files in appropriate directories and modify registry key for Company to autostart -->
<ComponentGroup Id="ProductComponentsx86">
<Component Id="BootComponentsx86" Guid="" Directory="BOOTDIR">
<Condition>
<![CDATA[NOT(VersionNT64)]]>
</Condition>
<File Id="CurrentConfig.xml.x86" Source="..\_Boot\CompanySoftware RT (x86)\CurrentConfig.xml" KeyPath="no" />
</Component>
<Component Id="PLCComponentx86" Guid="" Directory="PLCDIR">
<Condition>
<![CDATA[NOT(VersionNT64)]]>
</Condition>
<File Id="Port_851.app.x86" Source="..\_Boot\CompanySoftware RT (x86)\Plc\Port_851.app" KeyPath="no" />
</Component>
<Component Id="StartupReg.x86" Guid="" Directory="TARGETDIR">
<Condition>
<![CDATA[NOT(VersionNT64)]]>
</Condition>
<RegistryKey Root="HKLM"
Key="Software\Company\CompanySoftware\System">
<RegistryValue Name="SysStartupState"
Type="integer"
Value ="5"/>
</RegistryKey>
</Component>
</ComponentGroup>
</Fragment>

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 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?

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

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>