Wix service not listed in the local services - wix

I used procrun to create a windows service and tried to install it using WIX. I have placed all the required registry keys at the relevant places. But the service is still not listed in the local services. Below is my code.
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="DummyInstaller" Language="1033" Version="1.0.0.0" Manufacturer="Bryan" UpgradeCode="94D1BC64-7CC1-45DA-BD5F-8ED40980E75C">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" Platform="x64"/>
<Property Id="JAVA_CURRENT_VERSION64">
<RegistrySearch Id="JRE_CURRENT_VERSION_REGSEARCH64" Root="HKLM" Key="SOFTWARE\JavaSoft\Java Runtime Environment" Name="CurrentVersion" Type="raw" Win64="yes" />
</Property>
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate />
<Feature Id="ProductFeature" Title="DummyInstaller" Level="1" >
<!--<ComponentGroupRef Id="NewFilesGroup" />-->
<ComponentRef Id="REGISTRY_A" />
<ComponentRef Id="PROCRUN.EXE"/>
</Feature>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFiles">
<Directory Id="DummyDir" Name="DummyInstaller">
<!--<Directory Id="MyProgramDir" Name="MosquittoNew" />-->
<Directory Id="SERVERDIR" Name="Kube2UpdaterService">
<Component Id="REGISTRY_A" DiskId="1" Guid="*" Win64="no">
<RegistryKey Root="HKLM" Key="SOFTWARE\Apache Software Foundation\Procrun 2.0\Kube2UpdaterService\Parameters\Java" Action="createAndRemoveOnUninstall">
<RegistryValue Type="string" Name="Classpath" Value="E:\Service\Update_Service-1.0.jar" KeyPath="yes" />
<RegistryValue Type="string" Name="Jvm" Value="C:\Program Files\Java\jdk1.8.0_25\jre\bin\server\jvm.dll" />
<RegistryValue Type="multiString" Action="append" Name="Options">
<MultiStringValue Type="multiString" Name="Options" Action="append">-Duser.language=en</MultiStringValue>
<MultiStringValue Type="multiString" Name="Options" Action="append">-Duser.region=US</MultiStringValue>
</RegistryValue>
<RegistryValue Type="integer" Name="JvmMs" Value="256" />
<RegistryValue Type="integer" Name="JvmMx" Value="1024" />
<RegistryValue Type="integer" Name="JvmSs" Value="4000" />
</RegistryKey>
<RegistryKey Root="HKLM" Key="SOFTWARE\Apache Software Foundation\Procrun 2.0\Kube2UpdaterService\Parameters\Log" Action="createAndRemoveOnUninstall">
<RegistryValue Type="string" Name="Path" Value="c:\logs" />
<RegistryValue Type="string" Name="Level" Value="Error" />
<RegistryValue Type="string" Name="Prefix" Value="Kube2UpdaterService" />
<RegistryValue Type="string" Name="StdError" Value="c:\logs\stderr.txt" />
<RegistryValue Type="string" Name="StdOutput" Value="c:\logs\stdout.txt" />
</RegistryKey>
<RegistryKey Root="HKLM" Key="SOFTWARE\Apache Software Foundation\Procrun 2.0\Kube2UpdaterService\Parameters\Start" Action="createAndRemoveOnUninstall">
<RegistryValue Type="string" Name="Mode" Value="jvm" />
<RegistryValue Type="string" Name="Class" Value="com.kohls.kube.services.updater.UpdaterServiceMain" />
<RegistryValue Type="string" Name="Params" Value="start" />
</RegistryKey>
<RegistryKey Root="HKLM" Key="SOFTWARE\Apache Software Foundation\Procrun 2.0\Kube2UpdaterService\Parameters\Stop" Action="createAndRemoveOnUninstall">
<RegistryValue Type="string" Name="Mode" Value="jvm" />
<RegistryValue Type="string" Name="Class" Value="com.kohls.kube.services.updater.UpdaterServiceMain" />
<RegistryValue Type="string" Name="Method" Value="stop" />
<RegistryValue Type="string" Name="Params" Value="stop" />
<RegistryValue Type="string" Name="StdOutput" Value="auto" />
</RegistryKey>
<RegistryKey Root="HKLM" Key="SYSTEM\CurrentControlSet\Services\Kube2UpdaterService" Action="createAndRemoveOnUninstall">
<RegistryValue Type="string" Name="Description" Value="Kube updater service performing updates and installation" />
<RegistryValue Type="string" Name="DisplayName" Value="Kube2UpdaterService" />
<RegistryValue Type="string" Name="ImagePath" Value="E:\Service\prunsrv.exe //RS//Kube2UpdaterService" />
<RegistryValue Type="string" Name="DependsOnService" Value="Tcpip Afd" />
<RegistryValue Type="string" Name="ObjectName" Value="LocalSystem" />
<RegistryValue Type="integer" Name="ErrorControl" Value="1" />
<RegistryValue Type="integer" Name="Start" Value="2" />
<RegistryValue Type="integer" Name="Type" Value="16" />
</RegistryKey>
<RegistryKey Root="HKLM" Key="SYSTEM\CurrentControlSet\Services\Kube2UpdaterService\Parameters" Action="createAndRemoveOnUninstall">
<RegistryValue Type="string" Name="Test" Value="Pass" />
</RegistryKey>
</Component>
<Component Id="PROCRUN.EXE" DiskId="1" Guid="468C2DB3-F722-4DE6-8A91-B6FB8009757D" Win64="no">
<!-- this is the renamed procrun 64 bit executable -->
<File Id="prunsrv.exe" Name="prunsrv.exe" Source="E:\Service\prunsrv.exe" />
<ServiceInstall Id="PROCRUN" Type="ownProcess" Name="Kube2UpdaterService" DisplayName="Kube2UpdaterService" Description="Kube 2.0 Updater Service" Start="auto" Account="LocalService" ErrorControl="normal" Arguments=" //RS//Kube2UpdaterService" />
<ServiceControl Id="StartPRUNSRV" Start="install" Stop="both" Remove="uninstall" Name="Kube2UpdaterService" Wait="no" />
</Component>
</Directory>
</Directory>
</Directory>
</Directory>
</Fragment>
</Wix>
What am I doing wrong here? Please advice.

All registry keys under HKLM\SYSTEM\CurrentControlSet\Services are considered internal to Windows. The supported way in MSI to configure Windows Services is to use the Service* tables, like ServiceInstall.

Your:
<File Id="prunsrv.exe" Name="prunsrv.exe" Source="E:\Service\prunsrv.exe" />
needs to set be
<File Id="prunsrv.exe" Name="prunsrv.exe" Source="E:\Service\prunsrv.exe" Keypath="yes" />
I don't know why, but it helps

Related

Wix Toolset. Unable to Delete Registry Keys on Uninstall

I wrote an Installer with Wix. Everything works but I can't delete Registry Keys on Uninstall; the log says
Disallowing uninstallation of component: {...} since another client
exists
. The code is
<ComponentGroup Id="RegistryGroup">
<Component Id="_FB6B829B_467B_4EB8_B90C_9FF64097AD38" Guid="3FBC3951-B566-4EB9-842C-9FB70A8ECDE6" Transitive="no" Directory="TARGETDIR">
<RegistryKey Root="HKCU" Key="Software" ForceCreateOnInstall="no" ForceDeleteOnUninstall="no" />
</Component>
<Component Id="_F47C127C_2EAC_4F0C_B742_03FFBCABE8AE" Guid="A5D5FF6A-1EEA-4941-9DC5-573FDCB595A5" Transitive="no" Directory="TARGETDIR">
<RegistryKey Root="HKCU" Key="Software\[Manufacturer]" ForceCreateOnInstall="no" ForceDeleteOnUninstall="yes" />
</Component>
<Component Id="_684BCAC8_3162_4C7C_93A3_908CA1485F5C" Guid="92BF7699-68B1-44EE-BDE8-AF7E7CEB0EB0" Transitive="no" Directory="TARGETDIR">
<RegistryKey Root="HKCU" Key="Software\[Manufacturer]\[ProductName]" ForceCreateOnInstall="no" ForceDeleteOnUninstall="yes" />
</Component>
<Component Id="_FC3941D7_6617_4313_8257_5C3DE03A9838" Guid="7DCD2392-AC9A-4690-BC99-FEACAA774B08" Transitive="no" Directory="TARGETDIR">
<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]" Type="string" Name="ProductName" Value="[ProductName]" />
</Component>
<Component Id="_B86DABB3_7467_428B_9ECF_A6F59DB594E4" Guid="7A61E342-9764-4AA4-86A9-87C7A9C1DB09" Transitive="no" Directory="TARGETDIR">
<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]" Type="string" Name="ProductCode" Value="[ProductCode]" />
</Component>
<Component Id="_201EDD75_B6C7_4873_8AF9_06230F421B4F" Guid="52AE095B-FDEE-4923-B78A-F314BC26C6B6" Transitive="no" Directory="TARGETDIR">
<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]" Type="string" Name="Company" Value="[Manufacturer]" />
</Component>
<Component Id="_B76910AF_8752_45C2_98BF_80724406E3F9" Guid="81B183E7-67CA-4EF6-848E-55F8299B0A5C" Transitive="no" Directory="TARGETDIR">
<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]" Type="string" Name="ProductVersion" Value="[ProductVersion]" />
</Component>
<Component Id="_9BF1C162_A7A6_4B43_9D7C_6BD85C6C4F27" Guid="A571BA72-2216-49F0-AC28-E72C0866E9A3" Transitive="no" Directory="TARGETDIR">
<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]" Type="string" Name="Location" Value="[TARGETDIR]" />
</Component>
<Component Id="_B140E686_B49A_4BE4_93B3_DEEB07E5218E" Guid="F8996C3A-48EA-40DD-818B-5DC095B5F46F" Transitive="no" Directory="TARGETDIR">
<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]" Type="string" Name="Author" Value="[ARPCONTACT]" />
</Component>
<Component Id="_801F11AF_23B6_4C63_AEE7_05EB877E6543" Guid="0EC7189F-95BE-411E-BE48-A469032923F4" Transitive="no" Directory="TARGETDIR">
<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]" Type="string" Name="Website" Value="[ARPHELPLINK]" />
</Component>
</ComponentGroup>
What's wrong?
You have two or more installs with components that share the same GUIDs. You probably have authored upgrades of your install incorrectly in some way so every time you tested your installation you were adding more references to the GUIDs tied to these registry keys. You may also have more than one installation on your machine of your product.
You should have a bunch of registry entries under HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\S-1-5-18\Components{GUID} Note that the GUID is going to be a different format due to endianness (I think) May help
I would suggest testing your installer in a clean environment preferably on a VM with a clean snapshot you can revert to in case you author a broken installer and are unable to install/uninstall/upgrade the installer and get your machine into a bad state.

Using wix to install a Shell Extension x64 and put the extension assembly in the GAC

I have created a shell extension Library. If I use regasm x64 to register it with the codebase switch it works fine. I am now trying to put it into an package to deploy.
I have created a Wix project in VS2010 which is for x64. Product platform is x64. Now currently I am putting the file in the GAC with this.
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<!-- MYAppConnect.dll -->
<Component Id="com_MYAppContextMenu.dll" Guid="*" Win64="yes">
<File Id="file_MYAppContextMenu.dll" Name="MYAppContextMenu.dll"
Assembly=".net" Source="..\..\MYAppContextMenu\MYAppContextMenu.dll"
KeyPath="yes"/>
</Component>
</ComponentGroup>
I then used Heat.exe to get my registry stuff which produces this. File is in the GAC - the below registry settings are in the expected place - not in the wow64 hive.
So I assume I am doing something wrong. Could someone give me some tips, comments or direction on what to do.
<Fragment>
<DirectoryRef Id="TARGETDIR">
<Directory Id="dir29DD73560741DA307F10310D0631A50A" Name="MYAppContextMenu" />
</DirectoryRef>
</Fragment>
<Fragment>
<DirectoryRef Id="dir29DD73560741DA307F10310D0631A50A">
<Component Id="cmp322F9BBA6F4BF4E5180AB10BED5E416D" Guid="*" Win64="yes">
<Class Id="{3E9DE1E3-7B57-43A6-AA05-6CAF8018F450}" Context="InprocServer32" Description="MYAppContextMenu.FileContextMenuExt" ThreadingModel="both" ForeignServer="mscoree.dll">
<ProgId Id="MYAppContextMenu.FileContextMenuExt" Description="MYAppContextMenu.FileContextMenuExt" />
</Class>
<File Id="filCCBAC28E458283F290F1DB9F69EC2BF1" KeyPath="yes" Source="..\..\MYAppContextMenu\MYAppContextMenu.dll" />
<RegistryValue Root="HKCR" Key=".asc\shellex\ContextMenuHandlers\{3e9de1e3-7b57-43a6-aa05-6caf8018f450}" Value="MYAppContextMenu.TDBSContextMenu Class" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key=".csv\shellex\ContextMenuHandlers\{3e9de1e3-7b57-43a6-aa05-6caf8018f450}" Value="MYAppContextMenu.TDBSContextMenu Class" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key=".doc\shellex\ContextMenuHandlers\{3e9de1e3-7b57-43a6-aa05-6caf8018f450}" Value="MYAppContextMenu.TDBSContextMenu Class" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key=".docm\shellex\ContextMenuHandlers\{3e9de1e3-7b57-43a6-aa05-6caf8018f450}" Value="MYAppContextMenu.TDBSContextMenu Class" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key=".docx\shellex\ContextMenuHandlers\{3e9de1e3-7b57-43a6-aa05-6caf8018f450}" Value="MYAppContextMenu.TDBSContextMenu Class" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key=".gif\shellex\ContextMenuHandlers\{3e9de1e3-7b57-43a6-aa05-6caf8018f450}" Value="MYAppContextMenu.TDBSContextMenu Class" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key=".jpeg\shellex\ContextMenuHandlers\{3e9de1e3-7b57-43a6-aa05-6caf8018f450}" Value="MYAppContextMenu.TDBSContextMenu Class" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key=".jpg\shellex\ContextMenuHandlers\{3e9de1e3-7b57-43a6-aa05-6caf8018f450}" Value="MYAppContextMenu.TDBSContextMenu Class" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key=".log\shellex\ContextMenuHandlers\{3e9de1e3-7b57-43a6-aa05-6caf8018f450}" Value="MYAppContextMenu.TDBSContextMenu Class" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key=".msg\shellex\ContextMenuHandlers\{3e9de1e3-7b57-43a6-aa05-6caf8018f450}" Value="MYAppContextMenu.TDBSContextMenu Class" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key=".ods\shellex\ContextMenuHandlers\{3e9de1e3-7b57-43a6-aa05-6caf8018f450}" Value="MYAppContextMenu.TDBSContextMenu Class" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key=".odt\shellex\ContextMenuHandlers\{3e9de1e3-7b57-43a6-aa05-6caf8018f450}" Value="MYAppContextMenu.TDBSContextMenu Class" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key=".ott\shellex\ContextMenuHandlers\{3e9de1e3-7b57-43a6-aa05-6caf8018f450}" Value="MYAppContextMenu.TDBSContextMenu Class" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key=".pdf\shellex\ContextMenuHandlers\{3e9de1e3-7b57-43a6-aa05-6caf8018f450}" Value="MYAppContextMenu.TDBSContextMenu Class" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key=".png\shellex\ContextMenuHandlers\{3e9de1e3-7b57-43a6-aa05-6caf8018f450}" Value="MYAppContextMenu.TDBSContextMenu Class" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key=".ppt\shellex\ContextMenuHandlers\{3e9de1e3-7b57-43a6-aa05-6caf8018f450}" Value="MYAppContextMenu.TDBSContextMenu Class" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key=".pptm\shellex\ContextMenuHandlers\{3e9de1e3-7b57-43a6-aa05-6caf8018f450}" Value="MYAppContextMenu.TDBSContextMenu Class" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key=".pptx\shellex\ContextMenuHandlers\{3e9de1e3-7b57-43a6-aa05-6caf8018f450}" Value="MYAppContextMenu.TDBSContextMenu Class" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key=".raw\shellex\ContextMenuHandlers\{3e9de1e3-7b57-43a6-aa05-6caf8018f450}" Value="MYAppContextMenu.TDBSContextMenu Class" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key=".rtf\shellex\ContextMenuHandlers\{3e9de1e3-7b57-43a6-aa05-6caf8018f450}" Value="MYAppContextMenu.TDBSContextMenu Class" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key=".tif\shellex\ContextMenuHandlers\{3e9de1e3-7b57-43a6-aa05-6caf8018f450}" Value="MYAppContextMenu.TDBSContextMenu Class" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key=".tiff\shellex\ContextMenuHandlers\{3e9de1e3-7b57-43a6-aa05-6caf8018f450}" Value="MYAppContextMenu.TDBSContextMenu Class" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key=".wps\shellex\ContextMenuHandlers\{3e9de1e3-7b57-43a6-aa05-6caf8018f450}" Value="MYAppContextMenu.TDBSContextMenu Class" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key=".xlm\shellex\ContextMenuHandlers\{3e9de1e3-7b57-43a6-aa05-6caf8018f450}" Value="MYAppContextMenu.TDBSContextMenu Class" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key=".xls\shellex\ContextMenuHandlers\{3e9de1e3-7b57-43a6-aa05-6caf8018f450}" Value="MYAppContextMenu.TDBSContextMenu Class" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key=".xlsm\shellex\ContextMenuHandlers\{3e9de1e3-7b57-43a6-aa05-6caf8018f450}" Value="MYAppContextMenu.TDBSContextMenu Class" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key=".xlsx\shellex\ContextMenuHandlers\{3e9de1e3-7b57-43a6-aa05-6caf8018f450}" Value="MYAppContextMenu.TDBSContextMenu Class" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key=".xps\shellex\ContextMenuHandlers\{3e9de1e3-7b57-43a6-aa05-6caf8018f450}" Value="MYAppContextMenu.TDBSContextMenu Class" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key=".zip\shellex\ContextMenuHandlers\{3e9de1e3-7b57-43a6-aa05-6caf8018f450}" Value="MYAppContextMenu.TDBSContextMenu Class" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{3E9DE1E3-7B57-43A6-AA05-6CAF8018F450}\Implemented Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}" Value="" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{3E9DE1E3-7B57-43A6-AA05-6CAF8018F450}\InprocServer32\1.0.0.0" Name="Class" Value="MYAppContextMenu.FileContextMenuExt" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{3E9DE1E3-7B57-43A6-AA05-6CAF8018F450}\InprocServer32\1.0.0.0" Name="Assembly" Value="MYAppContextMenu, Version=1.0.0.0, Culture=neutral, PublicKeyToken=448edde23f8b5bbd" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{3E9DE1E3-7B57-43A6-AA05-6CAF8018F450}\InprocServer32\1.0.0.0" Name="RuntimeVersion" Value="v4.0.30319" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{3E9DE1E3-7B57-43A6-AA05-6CAF8018F450}\InprocServer32\1.0.0.0" Name="CodeBase" Value="file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/MYAppContextMenu/v4.0_1.0.0.0__448edde23f8b5bbd/MYAppContextMenu.dll" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{3E9DE1E3-7B57-43A6-AA05-6CAF8018F450}\InprocServer32" Name="Class" Value="MYAppContextMenu.FileContextMenuExt" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{3E9DE1E3-7B57-43A6-AA05-6CAF8018F450}\InprocServer32" Name="Assembly" Value="MYAppContextMenu, Version=1.0.0.0, Culture=neutral, PublicKeyToken=448edde23f8b5bbd" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{3E9DE1E3-7B57-43A6-AA05-6CAF8018F450}\InprocServer32" Name="RuntimeVersion" Value="v4.0.30319" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{3E9DE1E3-7B57-43A6-AA05-6CAF8018F450}\InprocServer32" Name="CodeBase" Value="file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/MYAppContextMenu/v4.0_1.0.0.0__448edde23f8b5bbd/MYAppContextMenu.dll" Type="string" Action="write" />
</Component>
</DirectoryRef>
</Fragment>
If you want to add a dll to GAC, can you try this? This will copy the dll to GAC when the feature is selected.
Feature definition
<Feature Id="Feature1" Title="Deploy dlls" Level="1">
<ComponentGroupRef Id="InfragisticsRunTime" />
</Feature>
Directory definition
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="CompanyName" Name="Some Company Name">
<Directory Id="INSTALLLOCATIONCONFIG" Name="Some Files">
</Directory>
<Directory Id="GAC" Name="GAC"> <!--Just a refrence-->
</Directory>
</Directory>
</Directory>
ComponentGroup definition
<Fragment>
<ComponentGroup Id="InfragisticsRunTime">
<ComponentRef Id="cmp79447E1633608740D07286A035DEFFB3" />
</ComponentGroup>
</Fragment>
Component definition
<Fragment>
<Component Id="cmp79447E1633608740D07286A035DEFFB3" Directory="GAC" Guid="*">
<File Id="filB48E30816BA7EF62BABB08A480F1E6BB" KeyPath="yes"
Source=".\Infragistics\Infragistics2.Documents.Core.v12.1.dll"
Assembly=".net" />
</Component>
</Fragment>

Do I need MSIUSEREALADMINDETECTION for this WIX configuration with a COM DLL registration?

I have a WIX installation setup for a COM DLL that seems to work fine without the MSIUSEREALADMINDETECTION value set to 1. However, I am not sure if it works on all configurations (Windows versions, .NET versions, etc).
Would you include ("Property Id="MSIUSEREALADMINDETECTION" Value="1") in my WIX configuration file just to be 100% sure that the MSI will register the COM DLL correctly in all corner cases?
As I have understood, this property will force the installer to run with "real" administrative rights.
This is for an enterprise application so it is very important the installation goes smooth.
WIX file:
<?xml version="1.0" encoding="UTF-8"?>
<!-- <Property Id="MSIUSEREALADMINDETECTION" Value="1" /> unsure if this is needed yet -->
<Property Id="ARPHELPLINK" Value="http://www.example.com" />
<Property Id="ARPURLINFOABOUT" Value="http://www.example.com" />
<PropertyRef Id="NETFRAMEWORK40FULL" />
<PropertyRef Id="NETFRAMEWORK40CLIENT" />
<Condition Message="This application requires .NET Framework 4.0 or later. Please install the .NET Framework 4.0 or later and then run this installer again.">
<![CDATA[Installed OR NETFRAMEWORK40FULL OR NETFRAMEWORK40CLIENT]]>
</Condition>
<WixVariable Id="WixUIDialogBmp" Value="InstallerBackgroundWix.bmp" />
<WixVariable Id="WixUIBannerBmp" Value="InstallerBannerWix.bmp" />
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="example">
<Component Id="MyAddin" Guid="guid3" Win64="no">
<File Id="exampleDLL" Source="$(var.example.TargetDir)example.dll"/>
<Class Id="{guid4}" Context="InprocServer32" Description="example" ThreadingModel="both" ForeignServer="mscoree.dll">
<ProgId Id="example" Description="example" />
</Class>
<RegistryValue Root="HKCR" Key="CLSID\{guid4}\Implemented Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}" Value="" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{guid4}\InprocServer32\1.0.0.0" Name="Class" Value="example.Addin" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{guid4}\InprocServer32\1.0.0.0" Name="Assembly" Value="example, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{guid4}\InprocServer32\1.0.0.0" Name="RuntimeVersion" Value="v4.0.30319" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{guid4}\InprocServer32\1.0.0.0" Name="CodeBase" Value="file:///[#exampleDLL]" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{guid4}\InprocServer32" Name="Class" Value="example.Addin" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{guid4}\InprocServer32" Name="Assembly" Value="example, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{guid4}\InprocServer32" Name="RuntimeVersion" Value="v4.0.30319" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{guid4}\InprocServer32" Name="CodeBase" Value="file:///[#exampleDLL]" Type="string" Action="write" />
<RegistryKey Root="HKLM" Key="SOFTWARE\Microsoft\Office\Outlook\Addins\example">
<RegistryValue Type="integer" Name="LoadBehavior" Value="3"/>
<RegistryValue Type="string" Name="Description" Value="example Outlook Add-in"/>
<RegistryValue Type="string" Name="FriendlyName" Value="example Outlook Add-in"/>
</RegistryKey>
</Component>
</Directory>
</Directory>
</Directory>
</Fragment>
No, don't use it. It does not give the install any more privilege to do anything. It's a legacy setting that enables older MSI installs to get values for the Privileged and AdminUser values as they were before UAC. In other words if you ask the value of the AdminUser property in the UI sequence (before the UAC prompt) it will tell you "true" if MSIUSEREALADMINDETECTION is set and "false" if it isn't (which is considered the right answer because there's been no elevation prompt so how can the user be Admin?).
Better answer at Mark MSI so it has to be run as elevated Administrator account
Summary: One difference is it changes the user credentials that CustomActions are run under.

Register 32-Bit COM Class in 64-Bit Component

I have built a ContextMenuHandler for the Windows Explorer shell using SharpShell. The assembly is built for AnyCPU, i.e. in MSIL, and can therefore run as both 32 bit and 64 bit.
I intend to run this on 64 bit windows only, however, 32 bit applications on windows 64 still use the 32 bit version of the shell for open dialogs, etc.
I have registered this assembly manually using the regasm tool on both architectures (32 & 64) and it works fine in the 64bit windows explorer. It also works from file open, and other shell provided dialogs, in 32 bit applications. This is the intended behavior, great!
The problem I have is writing the installation script, I'm using Wix 3.7 and I don't want to use regasm.
The 64 bit component is installed with:-
<Component Id="cmpMyAssembly64" Directory="INSTALL_TO_HERE"
Location="local" Win64="yes">
<File Id="filMyAssembly" KeyPath="yes" Source="mySource.dll"
Assembly=".net" AssemblyApplication="filMyAssembly"
ProcessorArchitecture="msil"/>
<Class Id="01201201-0000-0000-0000-012345670123" Description="My Handler"
Context="InprocServer32" ThreadingModel="both" ForeignServer="mscoree.dll">
<ProgId Id="A.ContextHandler" Description="Does something" />
</Class>
<RegistryKey Root="HKCR" Key="CLSID\{01201201-0000-0000-0000-012345670123}"
ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes">
<RegistryKey Key="Implemented Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}">
<RegistryValue Value="" Type="string" />
</RegistryKey>
<RegistryKey Key="InprocServer32">
<RegistryKey Key="1.0.0.0">
<RegistryValue Name="Class" Value="aNamespace.theClass" Type="string" />
<RegistryValue Name="Assembly" Value="!(bind.assemblyFullName.filMyAssembly)" Type="string" />
<RegistryValue Name="RuntimeVersion" Value="v4.0.30319" Type="string" />
<RegistryValue Name="CodeBase" Value="file:///[#filMyAssembly]" Type="string" />
</RegistryKey>
<RegistryValue Name="Class" Value="aNamespace.theClass" Type="string" />
<RegistryValue Name="Assembly" Value="!(bind.assemblyFullName.filMyAssembly)" Type="string" />
<RegistryValue Name="RuntimeVersion" Value="v4.0.30319" Type="string" />
<RegistryValue Name="CodeBase" Value="file:///[#filMyAssembly]" Type="string" />
</RegistryKey>
</RegistryKey>
<RegistryValue Root="HKCR" Key="Directory\Background\shellex\ContextMenuHandlers\MyHandler" Value="{guid}" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="Directory\shellex\ContextMenuHandlers\MyHandler" Value="{guid}" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="Drive\shellex\ContextMenuHandlers\MyHandler" Value="{guid}" Type="string" Action="write" />
</Component>
The problem I have is with the 32bit version's registration. Because it uses the same assembly I don't want to install the same file twice. All I do is create another (32 bit) component and make the necessary registry changes.
<Component Id="cmp32BitVersion" Directory="INSTALL_TO_32"
Location="local" Win64="no">
<Class ... just like 64bit
<RegistryKey ... just like 64bit
</Component>
Now, I assumed that the Win64 yes/no is how windows installer decides which part of the registry to write to. For 64bit components it writes to HKCR..., for the 32 bit component it would write to HKLM\SOFTWARE\WOW6432Node\Classes. The problem I have is that because both components are using a file reference [#filMyAssembly] I am getting ICE69: Mismatched component reference, warnings. The code still builds but I would prefer not to get the warnings, people who don't heed warnings should expect trouble.
Anyway, my question is: what is the correct way to register a MSIL assembly for COM in both 64 and 32 bit applications using Wix/Windows Installer?
MikeR and nickheppleston at wix-users look like they've found a solution:
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/64-bit-and-32-bit-Registry-Keys-in-same-MSI-td4439679.html
Thanks all who have responded. I followed MikeR's comments and came up
with the following - I found that I had to reference the x64
Architecture variable when defining both the Component and the
ComponentRef within the Feature section, as follows:
<Component Id="x86LicencingRegistryKeys" Guid="D113AD25-9E80-44E9-80C0-D66828809DBF" Win64="no">
<RegistryKey Id="x86ValidationCodeRegKey" Root="HKLM" Key="SOFTWARE\Product\Licencing" Action="createAndRemoveOnUninstall">
<RegistryValue Id="x86ValidationCodeRegValue" Name="ValidationCode" Action="write" Value="BgIAAACkAABSU0ExgAEAAAEAAQD9iAIysvGIxaJcIiENpOVTZbQosafHa9yXlfG0kxSWKJ01Hlfl+I+4ul5LhxoZkLo=" Type="string" />
<Permission User="Administrators" ChangePermission="yes" GenericAll="yes" />
<Permission User="CREATOR OWNER" ChangePermission="yes" GenericAll="yes" />
<Permission User="Power Users" ChangePermission="yes" GenericAll="yes" />
<Permission User="SYSTEM" ChangePermission="yes" GenericAll="yes" />
<Permission User="Users" ChangePermission="yes" GenericAll="no" GenericRead="yes" />
</RegistryKey>
<RegistryKey Id="x86LicenceKeyRegKey" Root="HKLM" Key="SOFTWARE\Product\Licencing" Action="createAndRemoveOnUninstall">
<RegistryValue Id="x86LicenceKeyRegValue" Name="LicenceKey" Action="write" Value="" Type="string" />
<Permission User="Administrators" ChangePermission="yes" GenericAll="yes" />
<Permission User="CREATOR OWNER" ChangePermission="yes" GenericAll="yes" />
<Permission User="Power Users" ChangePermission="yes" GenericAll="yes" />
<Permission User="SYSTEM" ChangePermission="yes" GenericAll="yes" />
<Permission User="Users" ChangePermission="yes" GenericAll="no" GenericRead="yes" />
</RegistryKey>
</Component>
<?if $(var.Architecture)=x64 ?>
<Component Id="x64LicencingRegistryKeys" Guid="49A15EB4-2DF8-4FF9-83ED-D306F076E232" Win64="yes">
<RegistryKey Id="x64ValidationCodeRegKey" Root="HKLM" Key="SOFTWARE\Product\Licencing" Action="createAndRemoveOnUninstall">
<RegistryValue Id="x64ValidationCodeRegValue" Name="ValidationCode" Action="write" Value="BgIAAACkAABSU0ExgAEAAAEAAQD9iAIysvGIxaJcIiENpOVTZbQosafHa9yXlfG0kxSWKJ01Hlfl+I+4ul5LhxoZkLo=" Type="string" />
<Permission User="Administrators" ChangePermission="yes" GenericAll="yes" />
<Permission User="CREATOR OWNER" ChangePermission="yes" GenericAll="yes" />
<Permission User="Power Users" ChangePermission="yes" GenericAll="yes" />
<Permission User="SYSTEM" ChangePermission="yes" GenericAll="yes" />
<Permission User="Users" ChangePermission="yes" GenericAll="no" GenericRead="yes" />
</RegistryKey>
<RegistryKey Id="x64LicenceKeyRegKey" Root="HKLM" Key="SOFTWARE\Product\Licencing" Action="createAndRemoveOnUninstall">
<RegistryValue Id="x64LicenceKeyRegValue" Name="LicenceKey" Action="write" Value="" Type="string" />
<Permission User="Administrators" ChangePermission="yes" GenericAll="yes" />
<Permission User="CREATOR OWNER" ChangePermission="yes" GenericAll="yes" />
<Permission User="Power Users" ChangePermission="yes" GenericAll="yes" />
<Permission User="SYSTEM" ChangePermission="yes" GenericAll="yes" />
<Permission User="Users" ChangePermission="yes" GenericAll="no" GenericRead="yes" />
</RegistryKey>
</Component>
<?endif ?>
<Feature Id="Complete" Title="TITLE" Description="Complete Package" Display="expand" Level="1" ConfigurableDirectory="INSTALLDIR">
<ComponentRef Id="x86LicencingRegistryKeys" />
<?if $(var.Architecture)=x64 ?><ComponentRef Id="x64LicencingRegistryKeys" /><?endif ?>
</Feature>

A complete WiX 3.6 bundle example bootstrapping a .NET 4 Client Profile

I tried to construct a working example of a WiX 3.6 installation script. We currently use WiX 3.5 and now we would like to begin installing the .NET 4 Client Profile framework as a pre-requisite for our MSI file that our product.wxs script creates. WiX 3.6 seems like the best way forward.
Is there a functional example of how to do this with WiX 3.6?
Here is our 3.5 script we use today:
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<!-- Version change handling -->
<?define UpgradeCode="###############################"?>
<?ifdef env.BUILD_NUMBER ?>
<?define ProductVersion="2.6.$(env.BUILD_NUMBER).0"?>
<?else ?>
<?define ProductVersion="2.6.0.0"?>
<?endif ?>
<Product Id="*" Name="###############################" Language="1033" Version="$(var.ProductVersion)" Manufacturer="###############################" UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="200" Compressed="yes" />
<!-- Custom actions for this installer -->
<Binary Id="###############################.dll" SourceFile="..\..\Libraries\###############################.CA.dll" />
<!-- Kill ##### before installation begins -->
<CustomAction Id="Kill#####ActionId" BinaryKey="###############################.dll" DllEntry="Kill#####Action" Execute="immediate" Impersonate="yes" Return="check" />
<InstallExecuteSequence>
<Custom Action="Kill#####ActionId" Before="InstallInitialize" />
</InstallExecuteSequence>
<!-- ADD/REMOVE Programs icon -->
<Icon Id="##############.ico" SourceFile="D:\##############\Input_WIX\NonHeat\##############.exe" />
<Property Id="ARPPRODUCTICON" Value="##############.ico" />
<Property Id="ARPHELPLINK" Value="http://##############" />
<!-- EULA agreement -->
<WixVariable Id="WixUILicenseRtf" Value="D:\##############\Input_WIX\Heat\License.rtf" />
<!-- Installer images -->
<WixVariable Id="WixUIBannerBmp" Value="InstallerTopImage.rle" />
<WixVariable Id="WixUIDialogBmp" Value="InstallerSideImage.rle" />
<UIRef Id="WixUI_Minimal" />
<Upgrade Id="$(var.UpgradeCode)">
<UpgradeVersion Minimum="1.0.0.0" Maximum="99.0.0.0" Property="PREVIOUSVERSIONSINSTALLED" IncludeMinimum="yes" IncludeMaximum="no" />
</Upgrade>
<!-- Require ##### to be installed -->
<Property Id="#####4.INSTALLPATH">
<RegistrySearch Id="RegistryFoundInstallPath" Key="SOFTWARE\McNeel\#####ceros\4.0" Root="HKLM" Name="InstallPath" Type="directory" />
</Property>
<Property Id="#####4.RECENT">
<RegistrySearch Id="RegistryFoundMostRecent" Key="SOFTWARE\McNeel\#####ceros\4.0" Root="HKLM" Name="MostRecent" Type="raw" />
</Property>
<Property Id="VRAYCOMMONDIR">
<RegistrySearch Id="ReigstryVRayCommon" Key="Software\ASGvis" Root="HKLM" Name="Common_dir" Type="raw" />
</Property>
<Condition Message="##### 4 required before install">
#####4.RECENT
</Condition>
<!-- Require administrator priveleges -->
<Condition Message="You need to be an administrator to install this product.">
Privileged</Condition>
<!-- Require .NET 3.5 SP1 to install -->
<PropertyRef Id="NETFRAMEWORK35_SP_LEVEL" />
<Condition Message='This setup requires the .NET Framework 3.5 with Service Pack 1 be installed.'>
<![CDATA[Installed OR (NETFRAMEWORK35_SP_LEVEL AND NETFRAMEWORK35_SP_LEVEL = "#1")]]>
</Condition>
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="#####4.INSTALLPATH">
<Directory Id="#####4.SYSTEM" Name="System"></Directory>
</Directory>
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLLOCATION" Name="##############"></Directory>
<Directory Id="DesktopFolder" Name="Desktop" />
<Directory Id="ProgramMenuFolder">
<Directory Id="ProgramMenuDir" Name="##############" />
</Directory>
</Directory>
<!-- Set FULL permissions to our shared folders -->
<Directory Id="CommonAppDataFolder">
<Directory Id="CommonApp##############" Name="##############">
<Directory Id="MODELLIBPATH" Name="##############">
<Component Id="##############UserPermissions" Guid="##############">
<CreateFolder>
<util:PermissionEx GenericRead="yes" GenericWrite="yes" GenericExecute="yes" Delete="yes" DeleteChild="yes" User="Users" Domain="[MachineName]" />
</CreateFolder>
</Component>
</Directory>
<Directory Id="APPDATAPATH" Name="#####">
<Component Id="##############UserPermissions" Guid="FC4BF85F-E7A4-45DE-B25C-8F9419E75307">
<CreateFolder>
<util:PermissionEx GenericRead="yes" GenericWrite="yes" GenericExecute="yes" Delete="yes" DeleteChild="yes" User="Users" Domain="[MachineName]" />
</CreateFolder>
</Component>
</Directory>
</Directory>
</Directory>
<Directory Id="FontsFolder"></Directory>
<Component Id="##############RegistryKeys" Guid="17A55BEA-605D-425a-AAEE-F35EC8C1061E" DiskId="1" KeyPath="yes">
<RegistryValue Id="##############RegInstallDir" Root="HKLM" Key="Software\##############\##############" Name="InstallPath" Action="write" Type="string" Value="[INSTALLLOCATION]" />
<RegistryValue Id="##############RegLibraryPath" Root="HKLM" Key="Software\##############\##############" Name="LibraryPath" Action="write" Type="string" Value="[INSTALLLOCATION]Library" />
<RegistryValue Id="##############RegModelLibraryPath" Root="HKLM" Key="Software\##############\##############" Name="ModelLibraryPath" Action="write" Type="string" Value="[MODELLIBPATH]" />
<RegistryKey Id="##############Reg#####PluginKey" Root="HKLM" Key="Software\McNeel\#####ceros\4.0\[#####4.RECENT]\Plug-ins\FCAF502A-1572-42a9-A2C3-F25D7953B1A5\PlugIn" Action="create" />
<RegistryValue Id="##############RegName#####4" Root="HKLM" Key="Software\McNeel\#####ceros\4.0\[#####4.RECENT]\Plug-ins\FCAF502A-1572-42a9-A2C3-F25D7953B1A5" Name="Name" Action="write" Type="string" Value="##############Server" />
<RegistryValue Id="##############Reg#####4" Root="HKLM" Key="Software\McNeel\#####ceros\4.0\[#####4.RECENT]\Plug-ins\FCAF502A-1572-42a9-A2C3-F25D7953B1A5" Name="FileName" Action="write" Type="string" Value="[INSTALLLOCATION]##############\##############Server.rhp" />
<RemoveRegistryKey Id="##############Skin" Root="HKLM" Key="Software\McNeel\#####ceros\4.0\Scheme: ##############" Action="removeOnInstall" />
</Component>
<Component Id="VRayKeys" Guid="{96E9EBAC-48B4-4517-9409-F921BE92B3AA}" DiskId="1" KeyPath="yes" NeverOverwrite="yes">
<RegistryValue Id="VRayKey" Root="HKLM" Key="Software\##############\Data" Name="Data" Action="write" Type="string" Value="FFFAAA" />
</Component>
<Component Id="VRayRegistryKeys" Guid="{4D8815FA-85E2-421f-8BF9-F7F5A4133E96}" DiskId="1" KeyPath="yes" NeverOverwrite="yes" Permanent="yes">
<Condition>
NOT VRAYCOMMONDIR
</Condition>
<RegistryValue Root="HKLM" Key="Software\ASGvis" Name="common_dir" Action="write" Type="string" Value="[INSTALLLOCATION]VRay\ASGVIS" />
</Component>
</Directory>
<Feature Id="##############Features" Title="#####" Level="1">
<ComponentGroupRef Id="##############" />
<ComponentRef Id="##############LibraryUserPermissions" />
<ComponentRef Id="##############SharedUserPermissions" />
<ComponentRef Id="##############RegistryKeys" />
<ComponentRef Id="VRayRegistryKeys" />
<ComponentRef Id="VRayKeys" />
<ComponentRef Id="ProgramMenuShortcuts" />
<ComponentRef Id="#####App" />
<ComponentRef Id="WixShortCut" />
<ComponentRef Id="##############ShortCut" />
<ComponentRef Id="TroubleShortCut" />
<ComponentRef Id="DesktopShortcut" />
<ComponentRef Id="VRayAuth" />
<ComponentRef Id="Fonts" />
</Feature>
<InstallExecuteSequence>
<RemoveExistingProducts Before="InstallInitialize" />
</InstallExecuteSequence>
<UI />
</Product>
<Fragment>
<Icon Id="ShortCutIcon" SourceFile="D:\##############Stage\Input_WIX\NonHeat\##############.exe" />
<Icon Id="TroubleShooterIcon" SourceFile="D:\##############Stage\Input_WIX\Heat\TroubleShooter\TroubleShooter.exe" />
<Icon Id="TeamViewerIcon" SourceFile="D:\##############Stage\Input_WIX\Heat\support.exe" />
<DirectoryRef Id="ProgramFilesFolder">
<Component Id="ProgramMenuShortcuts" Guid="881BD571-4FAF-4aa4-AB6E-15BB1629BE06">
<CreateFolder Directory="ProgramMenuDir" />
<RemoveFolder Id="RemoveMenuShortcuts" Directory="ProgramMenuDir" On="uninstall" />
<RegistryValue Root="HKCU" Key="Software\##############\##############ShortCut" Name="InstalledStartMenuShortcuts" Type="integer" Value="1" />
</Component>
</DirectoryRef>
<!-- This file is not Heat'ed, so we need this to install the executable -->
<DirectoryRef Id="INSTALLLOCATION" FileSource="Files">
<Component Id="##############App" Guid="FA41A015-7D80-4e50-A909-94BBA4D7546A">
<File Id="#####_Executable" Vital="yes" Source="D:\##############Stage\Input_WIX\NonHeat\##############.exe" />
</Component>
</DirectoryRef>
<DirectoryRef Id="INSTALLLOCATION" FileSource="Files">
<Component Id="WixShortCut" Guid="{8F2596B8-B7EC-4f40-AD64-DFC182A9353A}">
<RegistryKey Root="HKCU" Key="Software\##############\##############ShortCut" Action="create">
<RegistryValue Name="ShortCut" Value="1" Type="integer" KeyPath="yes" />
</RegistryKey>
<Shortcut Id="ProgramMenuApplicationShortcut" Name="##############" Target="[###############_Executable]" Directory="ProgramMenuDir" Show="normal" Icon="ShortCutIcon" />
</Component>
</DirectoryRef>
<DirectoryRef Id="INSTALLLOCATION">
<Component Id="TroubleShortCut" Guid="{9E960528-8798-41DD-8DEE-9C3336CD3C88}">
<RegistryKey Root="HKCU" Key="Software\#####\#####ShortCut" Action="create">
<RegistryValue Name="ShortCut2" Value="1" Type="integer" KeyPath="yes" />
</RegistryKey>
<Shortcut Id="TroubleshooterStartmenuShortcut" Name="Troubleshooter" Target="[INSTALLLOCATION]TroubleShooter\TroubleShooter.exe" Directory="ProgramMenuDir" Icon="TroubleShooterIcon" Show="normal"></Shortcut>
</Component>
</DirectoryRef>
<DirectoryRef Id="INSTALLLOCATION">
<Component Id="TeamViewerShortCut" Guid="{AD99CAC6-E485-444B-B075-2FD8BE4C87A8}">
<RegistryKey Root="HKCU" Key="Software\#####\#####ShortCut" Action="create">
<RegistryValue Name="ShortCut3" Value="1" Type="integer" KeyPath="yes" />
</RegistryKey>
<Shortcut Id="TeamviewerStartmenuShortcut" Name="Remote Assistance" Target="[INSTALLLOCATION]support.exe" Directory="ProgramMenuDir" Icon="TeamViewerIcon" />
</Component>
</DirectoryRef>
<DirectoryRef Id="INSTALLLOCATION" FileSource="Files">
<Component Id="DesktopShortcut" Guid="{EA9632D1-08ED-4257-A78F-B2373A65A5CF}">
<RegistryKey Root="HKCU" Key="Software\#####\##############ShortCut" Action="createAndRemoveOnUninstall">
<RegistryValue Name="desktopShortcut" Value="1" Type="integer" KeyPath="yes" />
</RegistryKey>
<Shortcut Id="DesktopShortcut" Directory="DesktopFolder" Name="#####" Icon="ShortCutIcon" Target="[######_Executable]" />
</Component>
</DirectoryRef>
<DirectoryRef Id="FontsFolder">
<Component Id="Fonts" Guid="{8C8EE16C-92B6-4926-A41C-55B79429071C}" NeverOverwrite="yes">
<File Id="bradley" Source="Fonts\bradhitc.ttf" TrueType="yes" />
</Component>
</DirectoryRef>
</Fragment>
<Fragment>
<DirectoryRef Id="#####4.SYSTEM">
<Component Id="VRayAuth" Guid="{ABED80D1-6EBA-48db-83E0-7CF48B0A55E8}">
<File Id="VRayAuthFile" KeyPath="yes" Source="..\..\Libraries\VRayAuth.dll" />
</Component>
</DirectoryRef>
</Fragment>
</Wix>
Heath Stewart's Introducing Managed Bootstrapper Applications provides a basic example in his blog.
You need to create a separate WiX bootstrapper project. See Building Installation Package Bundles in the WiX 3.6 documentation.
Once you have your bootstrapper, all you need to do is:
Add a reference to the file WixNetFxExtension.dll into your bootstrapper / managed bootstrapper application project.
Add the following as the first item in your chain.
<PackageGroupRef Id="NetFx40Web"/>
That's it. Further information and options are in the WixNetfxExtension documentation.