|
126 | 126 | <ComponentRef Id="ApplicationProgramsMenuShortcut"/>
|
127 | 127 | <ComponentRef Id="RegistryEntries"/>
|
128 | 128 | <ComponentRef Id="SetPath"/>
|
| 129 | + <ComponentRef Id="Telemetry"/> |
129 | 130 | <ComponentRef Id="ExplorerContextMenu"/>
|
130 | 131 | </Feature>
|
131 | 132 | <!-- We need to show EULA, and provide option to customize download location -->
|
132 | 133 | <Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
|
| 134 | + <!-- Need to get the Windows product name from the registry --> |
| 135 | + <Property Id="WINDOWS_PRODUCT_NAME"> |
| 136 | + <RegistrySearch Id="ProductName" Root="HKLM" Type="raw" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion" Name="ProductName" /> |
| 137 | + </Property> |
133 | 138 | <!-- Prerequisite check for Windows Universal C runtime -->
|
134 | 139 | <Property Id="UNIVERSAL_C_RUNTIME_INSTALLED" Secure="yes">
|
135 | 140 | <DirectorySearch Id="WindowsDirectory" Path="[WindowsFolder]">
|
|
157 | 162 | <Component Id="ProductVersionFolder" Guid="{e1a7f05e-0cd6-4227-80a8-e4fb311f045c}">
|
158 | 163 | <CreateFolder/>
|
159 | 164 | </Component>
|
| 165 | + <Component Id="Telemetry" Guid="{80520f20-471d-4d08-adc8-bab637627b39}" KeyPath="yes"> |
| 166 | + <Environment Id="PowerShellDistributionChannel" Action="create" Name="POWERSHELL_DISTRIBUTION_CHANNEL" Permanent="no" System="yes" Value="MSI:[WINDOWS_PRODUCT_NAME]"/> |
| 167 | + </Component> |
160 | 168 | <Component Id="RegistryEntries" Guid="{402e52f7-baf8-489d-af21-f756a6ca3530}">
|
161 |
| - <!-- create key for easy detection of a particular version of a powershell core package |
162 |
| - The upgrade code is used in the key because it will change when we allow SxS --> |
163 |
| - <RegistryKey Root="HKLM" Key="Software\Microsoft\PowerShellCore\InstalledVersions\$(var.UpgradeCode)" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes"> |
164 |
| - <RegistryValue Type="string" Value="$(var.ProductSemanticVersion)" Name="SemanticVersion"/> |
165 |
| - </RegistryKey> |
166 |
| - <!-- register ourselves in application registry so can be started using just Win+R `pwsh.exe` --> |
167 |
| - <RegistryKey Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\App Paths\pwsh.exe" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes"> |
168 |
| - <RegistryValue Type="string" Value="[$(var.ProductDirectoryName)]pwsh.exe"/> |
169 |
| - </RegistryKey> |
| 169 | + <!-- create key for easy detection of a particular version of a powershell core package |
| 170 | + The upgrade code is used in the key because it will change when we allow SxS --> |
| 171 | + <RegistryKey Root="HKLM" Key="Software\Microsoft\PowerShellCore\InstalledVersions\$(var.UpgradeCode)" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes"> |
| 172 | + <RegistryValue Type="string" Value="$(var.ProductSemanticVersion)" Name="SemanticVersion"/> |
| 173 | + </RegistryKey> |
| 174 | + <!-- register ourselves in application registry so can be started using just Win+R `pwsh.exe` --> |
| 175 | + <RegistryKey Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\App Paths\pwsh.exe" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes"> |
| 176 | + <RegistryValue Type="string" Value="[$(var.ProductDirectoryName)]pwsh.exe"/> |
| 177 | + </RegistryKey> |
170 | 178 | </Component>
|
171 | 179 | <!-- add ourselves to %PATH% so pwsh.exe can be started from Windows PowerShell or cmd.exe -->
|
172 | 180 | <Component Id="SetPath" Guid="{9dbb7763-7baf-48e7-b025-3bdedcb0632f}" KeyPath="yes">
|
|
0 commit comments