diff --git a/extensions/chocolatey-core.extension/CHANGELOG.md b/extensions/chocolatey-core.extension/CHANGELOG.md index 7347a6d69fa..048663ad0da 100644 --- a/extensions/chocolatey-core.extension/CHANGELOG.md +++ b/extensions/chocolatey-core.extension/CHANGELOG.md @@ -3,6 +3,7 @@ ## 1.3.6 - Bugfix `Get-AppInstallLocation`: Changed key to be forced as a single value (instead of array) +- Bugfix `Get-AppInstallLocation`: Added unescaping of app name pattern when calling 'Get-UninstallRegistryKey' ([#784](https://github.com/chocolatey/chocolatey-coreteampackages/issues/784)) ## 1.3.5 diff --git a/extensions/chocolatey-core.extension/extensions/Get-AppInstallLocation.ps1 b/extensions/chocolatey-core.extension/extensions/Get-AppInstallLocation.ps1 index 7234e060037..2581759dc50 100644 --- a/extensions/chocolatey-core.extension/extensions/Get-AppInstallLocation.ps1 +++ b/extensions/chocolatey-core.extension/extensions/Get-AppInstallLocation.ps1 @@ -40,7 +40,9 @@ function Get-AppInstallLocation { $ErrorActionPreference = "SilentlyContinue" Write-Verbose "Trying local and machine (x32 & x64) Uninstall keys" - $key = Get-UninstallRegistryKey $AppNamePattern | select -First 1 + # Needed to pass in the correct wildcard pattern to 'Get-UninstallRegistryKey' + $unescapedAppNamePattern = [regex]::Unescape($AppNamePattern) + $key = Get-UninstallRegistryKey $unescapedAppNamePattern | select -First 1 if ($key) { Write-Verbose "Trying Uninstall key property 'InstallLocation'" $location = $key.InstallLocation