Created
October 21, 2022 04:08
-
-
Save chsbuffer/b332b2a06190bc904129df04c22b3246 to your computer and use it in GitHub Desktop.
Fix uwp apps alias won't start from Run or File Explorer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/microsoft/terminal/issues/7081#issuecomment-1065833836 | |
$WinAppsPaths = @("C:\Program Files\WindowsApps") | |
$UserAppsPaths = @("$env:LOCALAPPDATA\Microsoft\WindowsApps") | |
$UserProfile = @("$env:USERPROFILE") | |
Get-ChildItem "HKCU:\Software\Microsoft\Windows\CurrentVersion\App Paths" | ForEach-Object { | |
$v = $_.GetValue('') | |
if (${v}?.StartsWith($WinAppsPaths)) { | |
$_ | Set-ItemProperty -Name "(default)" -Value "$UserAppsPaths\$($_.PSChildName)" | |
$_ | Set-ItemProperty -Name "Path" -Value $UserProfile | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment