Hi!
We have a simple app that has a "Check for updates" menu entry.
Basically it does the following:
1) Checks if there's a newer version available for download
2) If so, download and test its updater (File size and SHA1)
3) Call ShellExecute(Updater...,'/SILENT',..)
4) Call Application.Terminate since the EXE itself will be also updated
My problem is that a can only know if the ShellExecute was ok; I can't say anything about the updater itself: if it encounter an error, if the user aborted it, and so on.
Our updaters have the option to run the caller back, so I thought I could pass the exit code as a command line parameter to the main app (who called the updater):
[Run]
;If this updater was called with a "/ReturnToApp" parameter, execute the caller upon termination
Filename: "{app}\{#AppFolder}\{#ThisProgram}.exe"; Description: {cm:LaunchProgram,{cm:RunThisAppOnExit}}; Flags: nowait postinstall; Check: CheckReturnToAppOnExitParm
This has been working, so I thought I could just add a parameter to the [Run] entry above, something like:
Parameters: "/UpdateRetCode=XXX"
I don't know if it
even
makes sense to ask for an exit code from within the updater, and I'm chasing my own tail here, but I'd like to know if there's a way to obtain the exit code of the updater in this postinstall run entry, replacing the
"XXX"
above by the actual exit code of the updater.
Hope this makes sense... :-)
Thanks a bunch in advance!
Best regards,
Ronaldo