Allow silent uninstalls
This commit is contained in:
parent
4053e8cb76
commit
d5bae6b9c0
@ -540,11 +540,25 @@ Function .onInit
|
|||||||
"UninstallString"
|
"UninstallString"
|
||||||
StrCmp \$R0 "" done
|
StrCmp \$R0 "" done
|
||||||
|
|
||||||
|
IfSilent silentuninst
|
||||||
|
|
||||||
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \
|
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \
|
||||||
"${PROGRAM_NAME} is already installed. Click 'OK' to remove the previous version or 'Cancel' to cancel this upgrade." \
|
"${PROGRAM_NAME} is already installed. Click 'OK' to remove the previous version or 'Cancel' to cancel this upgrade." \
|
||||||
IDOK uninst
|
IDOK uninst
|
||||||
Abort
|
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:
|
uninst:
|
||||||
ClearErrors
|
ClearErrors
|
||||||
ExecWait '\$R0 _?=\$INSTDIR'
|
ExecWait '\$R0 _?=\$INSTDIR'
|
||||||
|
Loading…
Reference in New Issue
Block a user