Archive: cancelling during .oninit?


cancelling during .oninit?
i'm using inetc to download a file during initialization, and pressing the [x] up right doesn't seem to cancel the installation (nor the download). how do i make pressing the [x] abort the installation?


Doesn't Pop $R0 get the success state of the download?

Stu


lol. yes.

i can't believe i didn't use that method during the initialization....


no, this did not solve my problem. at least not entirely. now when i press [x] the initialization window disappears, and after 2-3 seconds i get a popup saying either "are you trying to install nquake offline?" or "installation aborted" - seemingly random!

code:


GetTempFileName $NQUAKE_INI

Start:
inetc::get /NOUNLOAD /CAPTION "Initializing..." /BANNER "nQuake is initializing, please wait..." /TIMEOUT 5000 "${INSTALLER_URL}/nquake.ini" $NQUAKE_INI /END
Pop $0
${Unless} $0 == "OK"
${If} $0 == "Terminated"
MessageBox MB_OK|MB_ICONEXCLAMATION "Installation aborted."
Abort
${Else}
${Unless} $RETRIES > 0
MessageBox MB_YESNO|MB_ICONEXCLAMATION "Are you trying to install nQuake offline?" IDNO Online
StrCpy $OFFLINE 1
Goto InitEnd
${EndUnless}
Online:
${Unless} $RETRIES == 2
MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION "Could not download nquake.ini." IDCANCEL Cancel
IntOp $RETRIES $RETRIES + 1
Goto Start
${EndUnless}
MessageBox MB_OK|MB_ICONEXCLAMATION "Could not download nquake.ini. Please try again later."
Cancel:
Abort
${EndIf}
${EndUnless}


what I want is the installer to immediately terminate and display the "installation aborted" message when you press [x] - I do not want it to wait 2-4 seconds before displaying any messages.