summaryrefslogtreecommitdiff
path: root/Modules/Internal/CPack/NSIS.template.in
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/Internal/CPack/NSIS.template.in')
-rw-r--r--Modules/Internal/CPack/NSIS.template.in8
1 files changed, 5 insertions, 3 deletions
diff --git a/Modules/Internal/CPack/NSIS.template.in b/Modules/Internal/CPack/NSIS.template.in
index 8a0c9726c..f16eaf659 100644
--- a/Modules/Internal/CPack/NSIS.template.in
+++ b/Modules/Internal/CPack/NSIS.template.in
@@ -932,9 +932,11 @@ 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
+ StrCpy $2 $0 1
+ StrCmp '"' $2 0 +3 ; checks if string is quoted (CPack before v3.20.6 did not quote it)
+ ExecWait '$0 /S'
+ Goto +2
+ ExecWait '"$0" /S'
IfErrors uninst_failed inst
uninst_failed: