mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Add registry value for easy detection (#6094)
Add registry value for easy detection. For example, the presence of a single key of 6.0.* x64. This is much faster than MSI detection. Note there are currently two GUIDs, one for 6.0.* x64 and one for 6.0.* x86. fixes #6090
This commit is contained in:
+6
-1
@@ -128,8 +128,13 @@
|
||||
<Component Id="ProductVersionFolder" Guid="{e1a7f05e-0cd6-4227-80a8-e4fb311f045c}">
|
||||
<CreateFolder/>
|
||||
</Component>
|
||||
<!-- register ourselves in application registry so can be started using just Win+R `pwsh.exe` -->
|
||||
<Component Id="RegistryEntries" Guid="{402e52f7-baf8-489d-af21-f756a6ca3530}">
|
||||
<!-- create key for easy detection of a particular version of a powershell core package
|
||||
The upgrade code is used in the key because it will change when we allow SxS -->
|
||||
<RegistryKey Root="HKLM" Key="Software\Microsoft\PowerShellCore\InstalledVersions\$(var.UpgradeCode)" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes">
|
||||
<RegistryValue Type="string" Value="$(var.ProductSemanticVersion)"/>
|
||||
</RegistryKey>
|
||||
<!-- 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">
|
||||
<RegistryValue Type="string" Value="[$(var.ProductVersionWithName)]pwsh.exe"/>
|
||||
</RegistryKey>
|
||||
|
||||
Reference in New Issue
Block a user