Function un.InstallWarning
Call un.GetCommandLineArguments
Pop $0
StrCmp $0 '/S' end
ReadRegStr $1 HKLM "SOFTWARE\XXX\" InstDir
MessageBox MB_YESNO|MB_ICONEXCLAMATION "WARNING: THIS WILL DELETE
THE ENTIRE $1 DIRECTORY INCLUDING ANY FILES YOU MAY HAVE ADDED OR
CHANGED. CONTINUE?" IDYES end IDNO nouninstall
nouninstall:
quit
end:
FunctionEnd
Function un.GetCommandLineArguments
Push $0
Push $1
Push $2
StrCpy $0 $CMDLINE 1
StrCpy $1 '"'
StrCpy $2 1
StrCmp $0 '"' loop
StrCpy $1 ' '
loop:
StrCpy $0 $CMDLINE 1 $2
StrCmp $0 $1 loop2
StrCmp $0 "" loop2
IntOp $2 $2 + 1
Goto loop
loop2:
IntOp $2 $2 + 1
StrCpy $0 $CMDLINE 1 $2
StrCmp $0 " " loop2
StrCpy $0 $CMDLINE "" $2
Pop $2
Pop $1
Exch $0
FunctionEnd nsis2 ignores commandline flags to uninstaller?
if i messagebox $0 after popping it, it clearly shows '/S'. my strcmp fails to make it jump to the end section (skipping the warning). with 1.98 this worked properly.