autoupgrader RestartApplication method
Return to Introduction  Previous page  Next page
Applies to
auAutoUpgrader component.  

procedure RestartApplication(const Params: String {$IFDEF D4} '' {$ENDIF});  

The RestartApplication used to restart the application which calls this method, with command-line parameters specified in Params parameter.  
If Params is not specified ('', empty text), the application will be restarted with parameters specified in RestartParams property.  
iiinfo If the RestartApplication method is called after checking the the application for updates (CheckUpdate method), it will try to upgrade your application (replace old files with new, which was downloaded with *.uTMP extension), using the upgrade method specified in the Info-file.  
tip You can also use this method to restart and upgrade your application "manually", instead of automatic restart which can be hooked and disabled in OnEndUpgrade event handler, but anyway, do not worry to call this method if you want to restart your application for ANY reason.  

See also
RestartParams property;  
CheckUpdate and Abort methods;  
OnEndUpgrade event;  
Info-file example.