Installer: Fixed cleanup of write testing with portable installs

This commit is contained in:
Birunthan Mohanathas 2012-06-25 11:08:18 +03:00
parent fe82e87b97
commit ccd3c10248

View File

@ -203,9 +203,9 @@ Function .onInit
CreateDirectory "$INSTDIR" CreateDirectory "$INSTDIR"
WriteINIStr "$INSTDIR\writetest~.rm" "1" "1" "1" WriteINIStr "$INSTDIR\writetest~.rm" "1" "1" "1"
Delete "$INSTDIR\writetest~.rm" Delete "$INSTDIR\writetest~.rm"
RMDir "$INSTDIR"
${If} ${Errors} ${If} ${Errors}
RMDir "$INSTDIR"
SetErrorLevel ${ERROR_WRITEFAIL} SetErrorLevel ${ERROR_WRITEFAIL}
Quit Quit
${EndIf} ${EndIf}
@ -467,13 +467,15 @@ Function PageOptionsOnLeave
ClearErrors ClearErrors
CreateDirectory "$0" CreateDirectory "$0"
WriteINIStr "$0\writetest~.rm" "1" "1" "1" WriteINIStr "$0\writetest~.rm" "1" "1" "1"
Delete "$0\writetest~.rm"
${If} ${Errors} ${If} ${Errors}
Delete "$0\writetest~.rm"
RMDir "$0" RMDir "$0"
MessageBox MB_OK|MB_ICONEXCLAMATION "$(WRITEERROR)" MessageBox MB_OK|MB_ICONEXCLAMATION "$(WRITEERROR)"
Abort Abort
${EndIf} ${EndIf}
RMDir "$0"
${EndIf} ${EndIf}
StrCpy $INSTDIR $0 StrCpy $INSTDIR $0