autoupgrader RestartParams property
Return to Introduction  Previous page  Next page
Applies to
auAutoUpgrader component.  

Declaration
property RestartParams: String;  

Description
The RestartParams property specifies the command-line arguments which should be used on restarting the updated application. When the application receives these command-line parameters (on restarting after update) — it triggers OnAfterRestart event.  
 
tip The RestartParams property can be also used to specify command-line options for another programs which will secretly extract your files locally on user's PC. This can be the setup program or self-extracting archive, which may require some command line options to extract files in "silent mode".  
 
For example, you think that local update is better done by a setup program. So you just need to download the setup file and execute it with "silent installation" command line option. The setup will locally extract all required files then run the main program upon completion.  
 
Let's suppose you are using Inno Setup (http://www.jrsoftware.org/isinfo.htm). Then just set the RestartParams property to "/silent" or "/verysilent" and point the #url in the InfoFile to your setup file.  
 
Important note!
iiwarning If you wish to use AutoUpgrader just for downloading the external setup program which will locally extract all required files, make sure that UpgradeMethod property set to umUseExternalSetup (or, another words, #method=1 in the InfoFile).  

See also
OnAfterRestart event, UpgradeMethod property;  
InfoFile example.  
File not found.