Browse Source

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.
Marc Jeanmougin 3 years ago
parent
commit
b795c96727
1 changed files with 1 additions and 3 deletions
  1. 1 3
      Modules/Internal/CPack/NSIS.template.in

+ 1 - 3
Modules/Internal/CPack/NSIS.template.in

@@ -932,9 +932,7 @@ Function .onInit
 ;Run the uninstaller
 uninst:
   ClearErrors
-  StrLen $2 "\@[email protected]"
-  StrCpy $3 $0 -$2 # remove "\@[email protected]" 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: