autoupgrader OnAfterRestart event
Return to Introduction  Previous page  Next page
Applies to
auAutoUpgrader component.  

Declaration
property OnAfterRestart: TNotifyEvent;  

Description
The OnAfterRestart event occurs on first start of upgraded application. Write this event handler to do some specific actions after successful program update and after restart (i.e: to show some "history" notes, etc).  
 
tip When application restarts after its upgrade, it execute itself with command-line parameter specified in RestartParams property. The AutoUpgrader simply checks whether this argument exists  
if ParamStr(1) = RestartParams then  
then, in case of need, fires OnAfterRestart event.  

Remark
iiwarning The AutoUpgrader could not trigger this event if you use some setup program or self-extracting archive to replace files from archive after downloading, instead of updating them with built-in updating mechanism. See description of RestartParams property for more details.  

See also
RestartParams property; OnEndUpgrade event.