|
39 | 39 | </Component> |
40 | 40 |
|
41 | 41 | <?if $(var.Platform)~=x64 ?> |
42 | | - <!-- For x64 installer, only add the sharedhost key when actually on native architecture. --> |
| 42 | + <!-- For x64 installer, only add to PATH when actually on native architecture. --> |
43 | 43 | <Component Id="cmpPath" Directory="DOTNETHOME" Condition="NOT NON_NATIVE_ARCHITECTURE"> |
44 | 44 | <!-- A stable keypath with the right SxS characteristics for our PATH entry--> |
45 | 45 | <RegistryKey Root="HKLM" Key="SOFTWARE\dotnet\Setup\InstalledVersions\$(var.Platform)\sharedhost"> |
46 | 46 | <RegistryValue KeyPath="yes" Action="write" Name="Path" Type="string" Value="[DOTNETHOME]"/> |
47 | 47 | </RegistryKey> |
| 48 | + <Environment Id="E_PATH" Name="PATH" Value="[DOTNETHOME]" Part="last" Action="set" System="yes" /> |
48 | 49 | </Component> |
49 | 50 | <?elseif $(var.Platform)~=x86 ?> |
50 | | - <!-- For x86 installer, only add the key when not on 64-bit platform. --> |
| 51 | + <!-- For x86 installer, only add to PATH when not on 64-bit platform. --> |
51 | 52 | <Component Id="cmpPath" Directory="DOTNETHOME" Condition="NOT VersionNT64"> |
52 | 53 | <!-- A stable keypath with the right SxS characteristics for our PATH entry--> |
53 | 54 | <RegistryKey Root="HKLM" Key="SOFTWARE\dotnet\Setup\InstalledVersions\$(var.Platform)\sharedhost"> |
54 | 55 | <RegistryValue KeyPath="yes" Action="write" Name="Path" Type="string" Value="[DOTNETHOME]"/> |
55 | 56 | </RegistryKey> |
| 57 | + <Environment Id="E_PATH" Name="PATH" Value="[DOTNETHOME]" Part="last" Action="set" System="yes" /> |
56 | 58 | </Component> |
57 | 59 | <?else?> |
58 | 60 | <Component Id="cmpPath" Directory="DOTNETHOME"> |
59 | 61 | <!-- A stable keypath with the right SxS characteristics for our PATH entry--> |
60 | 62 | <RegistryKey Root="HKLM" Key="SOFTWARE\dotnet\Setup\InstalledVersions\$(var.Platform)\sharedhost"> |
61 | 63 | <RegistryValue KeyPath="yes" Action="write" Name="Path" Type="string" Value="[DOTNETHOME]"/> |
62 | 64 | </RegistryKey> |
| 65 | + <Environment Id="E_PATH" Name="PATH" Value="[DOTNETHOME]" Part="last" Action="set" System="yes" /> |
63 | 66 | </Component> |
64 | 67 | <?endif?> |
65 | 68 |
|
|
72 | 75 | </File> |
73 | 76 | </Component> |
74 | 77 |
|
75 | | - <ComponentRef Id="cmpSetPath" /> |
76 | 78 | </ComponentGroup> |
77 | 79 |
|
78 | 80 | <Property Id="ProductCPU" Value="$(var.Platform)" /> |
|
86 | 88 | <CustomActionRef Id="Set_PROGRAMFILES_DOTNET_NON_NATIVE_ARCHITECTURE" /> |
87 | 89 | <?endif?> |
88 | 90 | </Fragment> |
89 | | - |
90 | | - <Fragment> |
91 | | - <Property Id="DISABLE_SETTING_HOST_PATH" Secure="yes"> |
92 | | - <RegistrySearch Id="DisableSettingHostPathSearch" Root="HKLM" Key="SOFTWARE\Microsoft\.NET" Type="raw" Name="DisableSettingHostPath" /> |
93 | | - </Property> |
94 | | - |
95 | | - <?if $(var.Platform)~=x64 ?> |
96 | | - <Component Id="cmpSetPath" Guid="{0B910ED8-0877-473D-8658-647382324433}" Directory="DOTNETHOME" Condition="DISABLE_SETTING_HOST_PATH <> "#1" AND NOT NON_NATIVE_ARCHITECTURE"> |
97 | | - <CreateFolder /> |
98 | | - <Environment Id="E_PATH" Name="PATH" Value="[DOTNETHOME]" Part="last" Action="set" System="yes" /> |
99 | | - </Component> |
100 | | - <?elseif $(var.Platform)~=x86 ?> |
101 | | - <Component Id="cmpSetPath" Guid="{0B910ED8-0877-473D-8658-647382324433}" Directory="DOTNETHOME" Condition="DISABLE_SETTING_HOST_PATH <> "#1" AND NOT VersionNT64"> |
102 | | - <CreateFolder /> |
103 | | - <Environment Id="E_PATH" Name="PATH" Value="[DOTNETHOME]" Part="last" Action="set" System="yes" /> |
104 | | - </Component> |
105 | | - <?else?> |
106 | | - <Component Id="cmpSetPath" Guid="{0B910ED8-0877-473D-8658-647382324433}" Directory="DOTNETHOME"> |
107 | | - <CreateFolder /> |
108 | | - <Environment Id="E_PATH" Name="PATH" Value="[DOTNETHOME]" Part="last" Action="set" System="yes" /> |
109 | | - </Component> |
110 | | - <?endif?> |
111 | | - |
112 | | - <util:BroadcastEnvironmentChange Action="set" Sequence="afterInstallFinalize" /> |
113 | | - |
114 | | - <InstallExecuteSequence> |
115 | | - <?if $(var.Platform)~=x64 ?> |
116 | | - <Custom Action="override Wix4BroadcastEnvironmentChange_X64" After="InstallFinalize" Condition="DISABLE_SETTING_HOST_PATH <> "#1""/> |
117 | | - <?elseif $(var.Platform)~=x86 ?> |
118 | | - <Custom Action="override Wix4BroadcastEnvironmentChange_X86" After="InstallFinalize" Condition="DISABLE_SETTING_HOST_PATH <> "#1""/> |
119 | | - <?elseif $(var.Platform)~=arm64 ?> |
120 | | - <Custom Action="override Wix4BroadcastEnvironmentChange_A64" After="InstallFinalize" Condition="DISABLE_SETTING_HOST_PATH <> "#1""/> |
121 | | - <?else?> |
122 | | - <?error Unknown platform, $(var.Platform) ?> |
123 | | - <?endif?> |
124 | | - </InstallExecuteSequence> |
125 | | - </Fragment> |
126 | 91 |
|
127 | 92 | <Fragment> |
128 | 93 | <!-- Unlike DOTNETHOME which gives precedence to a user specified value over an x64 suffix, here we always want the suffixed path --> |
|
0 commit comments