Actual Updater

Actual Updater - How to use

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

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:

Explorer

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):

ConfigAU.exe

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.
Example: {FCB1CDDE-F768-4D43-B1A1-BC019502DBC5}
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:

1.2
http://www.mysite.com/myprogram.exe

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:
http://www.actualupdater.com/update.txt

Every time when you release a new version of your program, you should also update this file on your server.


How Does It Work?

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.


Command Line Parameters

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":

C++ Code:

#include "Shlwapi.h"

ShellExecute(NULL, NULL, "Updater.exe", "/A", NULL, SW_SHOWNORMAL);

Delphi Code:

//don't forget to include ShellAPI into USES section

ShellExecute(0, 'open', 'Updater.exe', '/A', nil, SW_SHOWNORMAL);


Exit Codes

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.