|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> |
| 3 | + <Product Id="$(var.ProductCode)" Name="$(var.ProductName)" Language="1033" Version="$(var.Version)" |
| 4 | + Manufacturer="Microsoft Corporation" UpgradeCode="$(var.UpgradeCode)"> |
| 5 | + <Package InstallerVersion="$(var.InstallerVersion)" Compressed="yes" InstallScope="perMachine" /> |
| 6 | + |
| 7 | + <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> |
| 8 | + <Media Id="1" /> |
| 9 | + |
| 10 | + <!-- Custom Actions to assign a default of 0 to all switches --> |
| 11 | + <CustomAction Id="Set_OPT_NO_ANCM" Property="OPT_NO_ANCM" Value="0" /> |
| 12 | + <CustomAction Id="Set_OPT_NO_FTS" Property="OPT_NO_FTS" Value="0" /> |
| 13 | + <CustomAction Id="Set_OPT_NO_LTS" Property="OPT_NO_LTS" Value="0" /> |
| 14 | + <CustomAction Id="Set_OPT_NO_SHAREDFX" Property="OPT_NO_SHAREDFX" Value="0" /> |
| 15 | + <CustomAction Id="Set_OPT_NO_RUNTIME" Property="OPT_NO_RUNTIME" Value="0" /> |
| 16 | + <CustomAction Id="Set_OPT_NO_X86" Property="OPT_NO_X86" Value="0" /> |
| 17 | + <CustomAction Id="Set_OPT_NO_SHARED_CONFIG_CHECK" Property="OPT_NO_SHARED_CONFIG_CHECK" Value="0" /> |
| 18 | + |
| 19 | + <InstallExecuteSequence> |
| 20 | + <!-- Only set the options to 0 if they weren't already set in the hosting bundle. --> |
| 21 | + <!-- First option is to use user input, if they passed any (if they explicitly set an option to the empty string, we convert that to 0 here). --> |
| 22 | + <!-- Second option is to use registry values, if present. --> |
| 23 | + <!-- Third option is to set the options all to 0, which we do here. --> |
| 24 | + <Custom Action="Set_OPT_NO_ANCM" After="AppSearch">NOT OPT_NO_ANCM OR OPT_NO_ANCM=""</Custom> |
| 25 | + <Custom Action="Set_OPT_NO_FTS" After="AppSearch">NOT OPT_NO_FTS OR OPT_NO_FTS=""</Custom> |
| 26 | + <Custom Action="Set_OPT_NO_LTS" After="AppSearch">NOT OPT_NO_LTS OR OPT_NO_LTS=""</Custom> |
| 27 | + <Custom Action="Set_OPT_NO_SHAREDFX" After="AppSearch">NOT OPT_NO_SHAREDFX OR OPT_NO_SHAREDFX=""</Custom> |
| 28 | + <Custom Action="Set_OPT_NO_RUNTIME" After="AppSearch">NOT OPT_NO_RUNTIME OR OPT_NO_RUNTIME=""</Custom> |
| 29 | + <Custom Action="Set_OPT_NO_X86" After="AppSearch">NOT OPT_NO_X86 OR OPT_NO_X86=""</Custom> |
| 30 | + <Custom Action="Set_OPT_NO_SHARED_CONFIG_CHECK" After="AppSearch">NOT OPT_NO_SHARED_CONFIG_CHECK OR OPT_NO_SHARED_CONFIG_CHECK=""</Custom> |
| 31 | + </InstallExecuteSequence> |
| 32 | + |
| 33 | + <Feature Id="ProductFeature" Title="HostOptions" Level="1"> |
| 34 | + <ComponentGroupRef Id="ProductComponents" /> |
| 35 | + </Feature> |
| 36 | + </Product> |
| 37 | + |
| 38 | + <Fragment> |
| 39 | + <Directory Id="TARGETDIR" Name="SourceDir"> |
| 40 | + <Directory Id="ProgramFilesFolder"> |
| 41 | + <Directory Id="INSTALLFOLDER" Name="dotnet"> |
| 42 | + <Directory Id="MM" Name="$(var.MajorVersion).$(var.MinorVersion)" /> |
| 43 | + </Directory> |
| 44 | + </Directory> |
| 45 | + </Directory> |
| 46 | + </Fragment> |
| 47 | + |
| 48 | + <Fragment> |
| 49 | + <ComponentGroup Id="ProductComponents" Directory="MM"> |
| 50 | + |
| 51 | + <?ifdef ProductOptionsKey?> |
| 52 | + <?undef ProductOptionsKey?> |
| 53 | + <?endif?> |
| 54 | + |
| 55 | + <?define ProductOptionsKey=SOFTWARE\Microsoft\dotnet\host\options\$(var.MajorVersion).$(var.MinorVersion)?> |
| 56 | + |
| 57 | + <Component Id="OPT" Guid="*"> |
| 58 | + <RegistryKey Root="HKLM" Key="$(var.ProductOptionsKey)"> |
| 59 | + <RegistryValue Name="OPT_NO_ANCM" Type="integer" Value="[OPT_NO_ANCM]" KeyPath="yes" /> |
| 60 | + <RegistryValue Name="OPT_NO_FTS" Type="integer" Value="[OPT_NO_FTS]" /> |
| 61 | + <RegistryValue Name="OPT_NO_LTS" Type="integer" Value="[OPT_NO_LTS]" /> |
| 62 | + <RegistryValue Name="OPT_NO_SHAREDFX" Type="integer" Value="[OPT_NO_SHAREDFX]" /> |
| 63 | + <RegistryValue Name="OPT_NO_RUNTIME" Type="integer" Value="[OPT_NO_RUNTIME]" /> |
| 64 | + <RegistryValue Name="OPT_NO_X86" Type="integer" Value="[OPT_NO_X86]" /> |
| 65 | + <RegistryValue Name="OPT_NO_SHARED_CONFIG_CHECK" Type="integer" Value="[OPT_NO_SHARED_CONFIG_CHECK]" /> |
| 66 | + </RegistryKey> |
| 67 | + </Component> |
| 68 | + </ComponentGroup> |
| 69 | + </Fragment> |
| 70 | +</Wix> |
0 commit comments