summaryrefslogtreecommitdiff
path: root/Modules/Internal
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2022-03-21 12:25:10 -0400
committerBrad King <brad.king@kitware.com>2022-03-21 14:53:31 -0400
commitb795c96727c28982f88fcaf7127bd72067edcf4a (patch)
tree49465ae7edccf72d2fed4f0425ba849efc5e29c5 /Modules/Internal
parent0abd49ebb94d73cd975efeaa2e23a41f6f1a0e8c (diff)
downloadcmake-b795c96727c28982f88fcaf7127bd72067edcf4a.tar.gz
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.
Diffstat (limited to 'Modules/Internal')
-rw-r--r--Modules/Internal/CPack/NSIS.template.in4
1 files changed, 1 insertions, 3 deletions
diff --git a/Modules/Internal/CPack/NSIS.template.in b/Modules/Internal/CPack/NSIS.template.in
index 8a0c9726c9..18f1ee8d68 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: