The Actual Updater package contains only two files: Updater.exe and ConfigAU.exe .
Updater.exe is the main updater file that will be used for checking for updates:
Updater.exe uses file "Updater.ini" (or "Uninstall.ini" in case you use Actual Installer to distribute your program) that contains basic information of your program: Name, GUID, URL of Update Information File, etc..
These two files must be located in your app's main folder:
To create file "Updater.ini" and copy these two files into your app's folder use "Actual Updater Configuration Tool" (ConfigAU.exe, see shortcut on Desktop):
Enter your Product Name, GUID, select the main executable file (or any other file from the main folder of your application), choose where to get Product Version number (by default (if you know GUID), from Registry), and specify the URL of Update Information File (see below). After that, click "Generate Updater.ini".
What is GUID?
Product GUID is a reference number used as an identifier of your product.
Most installers generate a unique product GUID for every application and write it to Registry during installation. Here is how to get it from some installers:
- Actual Installer: see the section "General - Parameters"
- Inno Setup: open script file and look for "AppId="
- NSIS: open script file and look for "!define MUI_PRODUCT"
If you don't know the GUID of your product, then enter the Product Name in that field and choose "Main Executable File" in "Extract Version Number from" section.
Update Information File - is a plain text file (e.g. update.txt) that contains the information about new version: new version number and link to download this version:
You can create this file manually or by using "Actual Updater Configuration Tool". This file should be uploaded to your web server, so Updater.exe can access it, like this:
Every time when you release a new version of your program, you should also update this file on your server.
When a user launches the Updater.exe (as "Check for Updates" shortcut from "Start Menu \ You App" or from your app menu "Help \ Check for Updates"), Updater.exe does the following:
1. Reads the program info from Updater.ini and extracts the currently installed version of program (from Regsitry or Main Executable);
2. Downloads the Update Information File (update.txt) from specified URL;
3. Compares new version number and currently installed version number of the program;
4. Prompts to download if it is newer or exits.
Updater.exe supports the following command line parameters (switches):
/S - checks for updates in the silent mode. Message only appears if an update is available. No other messages (including connection error);
/A - automatically checks for updates on updater start. This parameter is recommended to use when calling Updater.exe from your program (e.g. from menu "Help \ Check for Updates").
Example: Updater.exe /A
/Q - quiet mode (super silent), no messages, only exit codes;
Here are some code examples on how to launch Updater.exe with switch "/A":
#include "Shlwapi.h" ShellExecute(NULL, NULL, "Updater.exe", "/A", NULL, SW_SHOWNORMAL);
//don't forget to include ShellAPI into USES section ShellExecute(0, 'open', 'Updater.exe', '/A', nil, SW_SHOWNORMAL);
Updater.exe returns the following exit codes:
0 - No updates available;
1 - Configuration file not found;
2 - Unable to read product details;
3 - Unable to connect to the update site;
4 - Incorrect update information file;
5 - Update available.