Allow silent uninstalls
This commit is contained in:
parent
4053e8cb76
commit
d5bae6b9c0
@ -540,11 +540,25 @@ Function .onInit
|
||||
"UninstallString"
|
||||
StrCmp \$R0 "" done
|
||||
|
||||
IfSilent silentuninst
|
||||
|
||||
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \
|
||||
"${PROGRAM_NAME} is already installed. Click 'OK' to remove the previous version or 'Cancel' to cancel this upgrade." \
|
||||
IDOK uninst
|
||||
Abort
|
||||
|
||||
silentuninst:
|
||||
ExecWait '\$R0 /S _?=\$INSTDIR'
|
||||
|
||||
ReadRegStr \$R1 HKLM \
|
||||
"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${PRODUCT_ID}-${WARCH}" \
|
||||
"UninstallString"
|
||||
StrCmp \$R1 "" 0 done
|
||||
|
||||
Delete "\$INSTDIR\\uninstall.exe"
|
||||
RMDir "\$INSTDIR"
|
||||
goto done
|
||||
|
||||
uninst:
|
||||
ClearErrors
|
||||
ExecWait '\$R0 _?=\$INSTDIR'
|
||||
|
Loading…
Reference in New Issue
Block a user