From 2c49d764d8d0874de973d6dc0a4140e86903e6a2 Mon Sep 17 00:00:00 2001 From: Philippe F Date: Wed, 7 Aug 2024 12:08:42 +0000 Subject: [PATCH 1/2] Fix typo preventing uninstallation Fixes #2512 --- automatic/graphviz/tools/chocolateyUninstall.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automatic/graphviz/tools/chocolateyUninstall.ps1 b/automatic/graphviz/tools/chocolateyUninstall.ps1 index e1ef0c08469..2a8f80a3384 100644 --- a/automatic/graphviz/tools/chocolateyUninstall.ps1 +++ b/automatic/graphviz/tools/chocolateyUninstall.ps1 @@ -14,7 +14,7 @@ if ($key.Count -eq 1) { file = "$($_.UninstallString.Replace(' /x86=0', ''))" #"C:\Program Files\OpenSSH\uninstall.exe" /x86=0 } - $installLocation = (Get-Item $key.UninstallString).DirectoryName + $installLocation = $_.UninstallString.DirectoryName Write-Debug "$packageName installed in: $installLocation" if (!$installLocation) { From cc8f70b72529fc17364d8baf16cf6a990bad3e5f Mon Sep 17 00:00:00 2001 From: Philippe F Date: Wed, 7 Aug 2024 12:35:47 +0000 Subject: [PATCH 2/2] Fixes silent uninstallation The uninstallation was working but not silent, the script was missing its puropose. --- automatic/graphviz/tools/chocolateyUninstall.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automatic/graphviz/tools/chocolateyUninstall.ps1 b/automatic/graphviz/tools/chocolateyUninstall.ps1 index 2a8f80a3384..d9cb905b86a 100644 --- a/automatic/graphviz/tools/chocolateyUninstall.ps1 +++ b/automatic/graphviz/tools/chocolateyUninstall.ps1 @@ -14,7 +14,7 @@ if ($key.Count -eq 1) { file = "$($_.UninstallString.Replace(' /x86=0', ''))" #"C:\Program Files\OpenSSH\uninstall.exe" /x86=0 } - $installLocation = $_.UninstallString.DirectoryName + $installLocation = $(Split-Path $_.UninstallString.trim('"') ) Write-Debug "$packageName installed in: $installLocation" if (!$installLocation) {