From b795c96727c28982f88fcaf7127bd72067edcf4a Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Mon, 21 Mar 2022 12:25:10 -0400 Subject: CPack/NSIS: Fix uninstall command when run from installer The quoting introduced by commit eb3b3bacdc (CPack/NSIS: Fix uninstall on Windows using "Apps & Features", 2021-09-13, v3.22.0-rc1~136^2) created two errors in the uninstaller call: double quoting of the uninstaller executable, and quotes added to the `_?=` argument which does not support them. Simplify the command. --- Modules/Internal/CPack/NSIS.template.in | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Modules/Internal/CPack/NSIS.template.in b/Modules/Internal/CPack/NSIS.template.in index 8a0c972..18f1ee8 100644 --- a/Modules/Internal/CPack/NSIS.template.in +++ b/Modules/Internal/CPack/NSIS.template.in @@ -932,9 +932,7 @@ Function .onInit ;Run the uninstaller uninst: ClearErrors - StrLen $2 "\@CPACK_NSIS_UNINSTALL_NAME@.exe" - StrCpy $3 $0 -$2 # remove "\@CPACK_NSIS_UNINSTALL_NAME@.exe" from UninstallString to get path - ExecWait '"$0" /S _?=$3' ;Do not copy the uninstaller to a temp file + ExecWait '$0 /S' IfErrors uninst_failed inst uninst_failed: -- cgit v0.12