I know this might seem like a duplicate, but I have tried almost anything online including the following links below:
When using double click, the installation completes successfully and it launches my EXE which is a WPF UI.
The problem is that if run in the command line, the WiX installer installs but my WPF doesn't launch. There is no driver update. Note that I have custom switches such as /? /q /forerestart /noreboot in my WPF.
Launch after install, with no UI? http://wixtoolset.org/documentation/manual/v3/howtos/ui_and_localization/run_program_after_install.html
Here is my code below
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"><?define INF_INSTALLER_TargetDir=$(var.INF_INSTALLER.TargetDir)?>
<Product Id="guid here" Name="INF_INSTALLER" Language="1033" Version="1.1.1.3" Manufacturer="Intel Corporation" UpgradeCode="guid here">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" InstallPrivileges="elevated" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate EmbedCab="yes" />
<!--User Agrrement-->
<WixVariable Id="WixUILicenseRtf" Value="$(var.ProjectDir)EULAsingleuselicense.rtf" />
<WixVariable Id="WixUIBannerBmp" Value="images\Banner.jpg" />
<WixVariable Id="WixUIDialogBmp" Value="images\Background.png" />
<!--Chosing the UI version-->
<!-- Step 2: Add UI to your installer / Step 4: Trigger the custom action -->
<!-- UI to installer -->
<UI>
<UIRef Id="WixUI_Minimal" />
<!-- Launch the applicaiton -->
<Publish Dialog="ExitDialog" Control="Finish" Event="DoAction" Value="LaunchApplication">NOT Installed</Publish>
</UI>
<!--<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Launch INF INSTALLER" /> -->
<!-- Step 3: Include the custom action -->
<Property Id="WixShellExecTarget" Value="[#INF_INSTALLER.exe]" />
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX" Value="1" />
<CustomAction Id="LaunchApplication" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" />
<Feature Id="ProductFeature" Title="INF INSTALLER" Level="1">
<ComponentGroupRef Id="ProductComponents" />
<ComponentRef Id="ApplicationShortcut" />
<!--<ComponentRef Id="ApplicationShortcutDesktop" /> -->
</Feature>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="TempFolder">
<Directory Id="ManufacturerFolder" Name="INF_INSTALLER">
<Directory Id="INSTALLFOLDER" Name="INF_INSTALLER" />
</Directory>
<Directory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="!(bind.property.ProductName)" />
</Directory>
<!--<Directory Id="DesktopFolder" Name="Desktop" />-->
</Directory>
</Directory>
</Fragment>
<Fragment>
<DirectoryRef Id="ApplicationProgramsFolder">
<Component Id="ApplicationShortcut" Guid="guid here">
<Shortcut Id="ApplicationStartMenuShortcut" Name="!(bind.property.ProductName)" Description="INF INSTALLER" Target="[INSTALLFOLDER]INF_INSTALLER.exe" WorkingDirectory="INSTALLFOLDER" />
<RemoveFolder Id="RemoveApplicationProgramsFolder" Directory="ApplicationProgramsFolder" On="uninstall" />
<RegistryValue Root="HKCU" Key="Software\INF_INSTALLER" Name="installed" Type="integer" Value="1" KeyPath="yes" />
</Component>
</DirectoryRef>
<!--<DirectoryRef Id="DesktopFolder">
<Component Id="ApplicationShortcutDesktop" Guid="guid here">
<Shortcut Id="ApplicationDesktopShortcut" Name="!(bind.property.ProductName)" Description="INF INSTALLER" Target="[INSTALLFOLDER]INF_INSTALLER.exe" WorkingDirectory="INSTALLFOLDER" />
<RemoveFolder Id="RemoveDesktopFolder" Directory="DesktopFolder" On="uninstall" />
<RegistryValue Root="HKCU" Key="Software\INF_INSTALLER" Name="InstalledCompleted" Type="integer" Value="1" KeyPath="yes" />
</Component>
</DirectoryRef>-->
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<Component Id="windowscert.cer" Guid="guid here">
<File Id="windowscert.cer" Name="windowscert.cer" Source="$(var.INF_INSTALLER_TargetDir)windowscert.cer" />
</Component>
<Component Id="myinf.inf" Guid="guid here">
<File Id="myinf.inf" Name="myinf.inf" Source="$(var.INF_INSTALLER_TargetDir)myinf.inf" />
</Component>
<Component Id="INF_INSTALLER.exe" Guid="guid here">
<File Id="INF_INSTALLER.exe" Name="INF_INSTALLER.exe" Source="$(var.INF_INSTALLER_TargetDir)INF_INSTALLER.exe" />
</Component>
<Component Id="INF_INSTALLER.exe.config" Guid="guid here">
<File Id="INF_INSTALLER.exe.config" Name="INF_INSTALLER.exe.config" Source="$(var.INF_INSTALLER_TargetDir)INF_INSTALLER.exe.config" />
</Component>
<Component Id="INF_INSTALLER.pdb" Guid="guid here">
<File Id="INF_INSTALLER.pdb" Name="INF_INSTALLER.pdb" Source="$(var.INF_INSTALLER_TargetDir)INF_INSTALLER.pdb" />
</Component>
</ComponentGroup>
</Fragment>
<Fragment>
<CustomAction Id="LaunchFile" FileKey="INF_INSTALLER.exe" ExeCommand="/quiet" Return="asyncNoWait" />
<Property Id="WixSilentExecCmdLine" Value="/silent" Hidden="yes"/>
<CustomAction Id="SilentExecExample" BinaryKey="WixCA" DllEntry="WixSilentExec" Execute="immediate" Return="check"/>
<InstallExecuteSequence>
<Custom Action="LaunchFile" After="InstallFinalize">NOT Installed</Custom>
<Custom Action="SilentExecExample" After="TheActionYouWantItAfter"/>
<RemoveExistingProducts After="InstallFinalize" />
</InstallExecuteSequence>
</Fragment>
</Wix>