Browse Source

CPack/NSIS: Add support for unquoted (legacy) uninstaller strings

Marc Jeanmougin 3 years ago
parent
commit
5d2ceaada8
1 changed files with 4 additions and 0 deletions
  1. 4 0
      Modules/Internal/CPack/NSIS.template.in

+ 4 - 0
Modules/Internal/CPack/NSIS.template.in

@@ -932,7 +932,11 @@ Function .onInit
 ;Run the uninstaller
 uninst:
   ClearErrors
+  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: