Skip to content

[release/v7.4.0-preview.7]Only register App Path for release package #20549

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions assets/wix/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@
<ComponentRef Id="ApplicationProgramsMenuShortcut"/>
<ComponentRef Id="MURegistryEntries"/>
<ComponentRef Id="RegistryEntries"/>
<ComponentRef Id="SharedRegistryEntries"/>
<?if $(var.IsPreview)!=True?>
<ComponentRef Id="AppPath"/>
<?endif?>
<ComponentRef Id="SetPath"/>
<ComponentRef Id="Telemetry"/>
<ComponentRef Id="DisableTelemetry"/>
Expand Down Expand Up @@ -209,13 +211,15 @@
</RegistryKey>

</Component>
<Component Id="SharedRegistryEntries">
<?if $(var.IsPreview)!=True?>
<Component Id="AppPath">
<!-- register ourselves in application registry so can be started using just Win+R `pwsh.exe` -->
<RegistryKey Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\App Paths\pwsh.exe" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes">
<!-- As a shared path, the last one to install will overwrite any previous value. It also needs to be in its own component to properly ref-count and be removed when appropriate. -->
<RegistryValue Type="string" Value="[VersionFolder]pwsh.exe" KeyPath="yes"/>
</RegistryKey>
</Component>
<?endif?>
<Component Id="DisableTelemetry" Guid="{E86F5C91-3721-4C5C-A31F-1F0A5A468573}" KeyPath="yes">
<Condition>DISABLE_TELEMETRY</Condition>
<Environment Id="PowerShellTelemetryOptout" Action="set" Name="POWERSHELL_TELEMETRY_OPTOUT" Permanent="no" System="yes" Value="1"/>
Expand Down