Exit 1 reserved
13 members have voted
Recently Browsing 0 members
No registered users viewing this page.
I have a problem in that one script runs successfully and gets to this line
MsgBox(0x40,$UpdateID,"Successfully installed update " & $UpdateID) Exit(1) This script was started by another at this point:
$InstallationResult = RunWait($ExeFileFullPath & " " & $InstallerParameters) ProcessWaitClose(StringReplace($FileName,"mmupdate","exe")) SplashOff() If $InstallationResult = $DesiredResult Then FileMove($ExeFileFullPath, $FileFullPath & ".done") LogWrite("Update succeeded") Else ; the update failed... oh dear what shall we do? If 1 = MsgBox(0x21,$PrettyScriptName,"The update failed to install - try again another time?") Then FileMove($ExeFileFullPath, $FileFullPath) LogWrite("Update failed - will be retried on next launch") Else FileDelete($ExeFileFullPath) LogWrite("Update failed - deleted by user request") EndIf EndIf I had two problems - first
I had to put the processwaitclose in because otherwise the program would go onto the "update failed" msgbox before getting to the "update was successful" msgbox!
even with the processwaitclose it gives the $installationResult as 0 not 1 even though when it finally finished the first script the exit code must have been 1 as that follows after msgbox which shows?
Any ideas? Is it possible that 2 exit codes are produced??? Is it possible for $installationResult to be set before the program finishes?