Dear Raul,
to handle your case you could try with modifying the default update script behavior, in order to intercept if the running package completed its installation.
This could be done with evaluating the value that returns the update package ( ... the one executed by the update script).
To return a desired value with the setup process ( ... in your case the downloaded update package), in the main script code you can use the "Terminate with Exit Code" statement just after the Apply Install command.
For example;
Code: Select all
...
Apply Install (get result into variable SUCCESS)
if Variable SUCCESS Equals COMPLETE
Terminate with Exit Code 100
end
With the above example the setup process returns 100 if it completes correctly.
In the update script code instead, you need to verify if the value returned by the downloaded update, it is equal to 100 once its install process is terminated.
Example,
- By default with the update script, you have the following lines of code that are responsible of the update installation (Run Program) and to keep track of the installed updates with the "installedupdates.dat " file (Write into Text File).
Code: Select all
...
Run Program $SUPPORTDIR$\$UPDATE_NAME$.exe $UPDATE_PARAMETERS$ $SILENTVAR$ REBOOTCOMPUTER=FALSE RUNAPP=FALSE REBOOTNOW=CANCEL (WAIT)
if Variable UPDATE_LOG Equals TRUE
Write into Text File $EXEDIR$\installedupdates.dat from Value $UPDATE_NAME$ (at end of file)
end
...
Consequently, you should modify the above lines as below;
Code: Select all
...
Set Variable MY_UPDATE_RESULT to
Run Program $SUPPORTDIR$\$UPDATE_NAME$.exe $UPDATE_PARAMETERS$ $SILENTVAR$ REBOOTCOMPUTER=FALSE RUNAPP=FALSE REBOOTNOW=CANCEL (WAIT, get result into variable MY_UPDATE_RESULT)
if Variable MY_UPDATE_RESULT Equals 100
if Variable UPDATE_LOG Equals TRUE
Write into Text File $EXEDIR$\installedupdates.dat from Value $UPDATE_NAME$ (at end of file)
end
end
...
With the above example the "installedupdates" file, it will be updated if the value returned by the Run Program is 100 only ( ... update installation completed).
Alternatively and if you don't want to use the above method, you could even decide to install your updates silently.
Hope this helps you.
Regards