autoupgrader UpgradeMethod property
Info-file example
Return to Introduction  Previous page  Next page
Applies to
auAutoUpgrader component as subproperty of InfoFile structure.  

Declaration
type  
  TauUpgradeMethod = (umAutoUpgrade, umRedirectToURL);  
 
property UpgradeMethod: TauUpgradeMethod;  

Description
The UpgradeMethod property controls how you would like to upgrade your application: automatically downloading and updating all newer files (umSelfUpgrade), or just redirecting users to first URL listed in the Files property (umRedirectToURL).  
 
There is three possible values:  
ValueMeaning  
umSelfUpgradecomponent should download and replace all newer files itself;  
umUseExternalSetupAutoUpgrader should download just setup-file which will locally extract all required locally. The application will be restarted upon completion of external installation.  
umRedirectToURLdoes not download anything. It just opens new browser window and redirect users to first URL specified in Files property (in the Info-file).  

Note

iiwarning Always use umUseExternalSetup option if you are really use setups to update files instead of built-in mechanism. Otherwise, the AutoUpgrader will rename downloaded setup file to the name of your main program, execute it, but the file of your main program will be locked.  
 
In case if the UpgradeMethod = umUseExternalSetup (#method=1 in the Info-file), the setup will extracted to the temporary folder (i.e: Windows\Temp) without locking any of your files.  

See also
Files and UpgradeMsg properties of InfoFile stucture;  
RestartParams property and OnAfterRestart event;  
Info-file example.