dotnet-installer/packaging/windows/registrykeys.wxs
Sridhar Periyasamy 3f00cfbeb9 x64 installer now creates registry keys in both x64 and Wow32 hives.
This is required to enable 32-bit MSIs (like VS) that need to access the
registry key on a 64-bit OS. Refer #250
2015-11-20 18:32:58 -08:00

32 lines
No EOL
1.9 KiB
XML

<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?include "Variables.wxi" ?>
<Fragment>
<ComponentGroup Id="AuthoredRegistryKeys">
<!--Need this to set the reg keys for both x64 and x86 from the x64 installer-->
<?if $(var.Platform) = x64?>
<Component Id="SetupRegistry_x64" Directory="TARGETDIR" Guid="*" Win64="yes">
<RegistryKey Root="HKLM" Key="SOFTWARE\dotnet\Setup">
<RegistryValue Action="write" Name="Install" Type="integer" Value="1" KeyPath="yes"/>
<RegistryValue Action="write" Name="InstallDir" Type="string" Value="[DOTNETHOME]" />
<RegistryValue Action="write" Name="Version" Type="string" Value="$(var.Dotnet_ProductVersion)" />
</RegistryKey>
<Environment Id="E_PATH" Name="PATH" Value="[DOTNETHOME]bin" Permanent="no" Part="last" Action="set" System="yes" />
<Environment Id="E_DOTNET_HOME" Name="DOTNET_HOME" Value="[DOTNETHOME]" Permanent="no" Part="all" Action="set" System="yes" />
</Component>
<?endif?>
<Component Id="SetupRegistry_x86" Directory="TARGETDIR" Guid="*" Win64="no">
<RegistryKey Root="HKLM" Key="SOFTWARE\dotnet\Setup">
<RegistryValue Action="write" Name="Install" Type="integer" Value="1" KeyPath="yes"/>
<RegistryValue Action="write" Name="InstallDir" Type="string" Value="[DOTNETHOME]" />
<RegistryValue Action="write" Name="Version" Type="string" Value="$(var.Dotnet_ProductVersion)" />
</RegistryKey>
<!--In case of x64 installer these env vars are already set above-->
<?if $(var.Platform) = x86?>
<Environment Id="E_PATH" Name="PATH" Value="[DOTNETHOME]bin" Permanent="no" Part="last" Action="set" System="yes" />
<Environment Id="E_DOTNET_HOME" Name="DOTNET_HOME" Value="[DOTNETHOME]" Permanent="no" Part="all" Action="set" System="yes" />
<?endif?>
</Component>
</ComponentGroup>
</Fragment>
</Wix>