Actual Updater logo

How to Create Update Program for Your App

To start creating the update program for your application, first, download Actual Updater and install it.

The Actual Updater package contains only two files: Updater.exe and Config.exe .

Updater.exe is the main update program which is used for checking for updates:

Updater.exe

Updater.exe uses file "Updater.ini" (or "Uninstall.ini" in case you use Actual Installer) which contains information about your program: Name, Version, URL of Update Information File, and other.

Note: If you use Actual Updater with Actual Installer, please read this article.

These two files (Updater.exe and Updater.ini) must be located in your app's main folder:

Explorer

To create "Updater.ini" and copy these two files into your app's folder use "Actual Updater Configuration Tool" (file Config.exe, shortcut on Desktop):

Actual Update Configuration Tool

Enter your Product Name, and select Main Executable file. If your app doesn't have it, just select any file from the folder where your application is located. In this folder will be created the update files.

In order to check for updates, Updater.exe should know the currently installed version of the application. There a few methods how to get this version:

What is GUID?
Product GUID is a reference number used as an identifier of your product.
Example: {FCB1CDDE-F768-4D43-B1A1-BC019502DBC5} is for Actual Updater
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:
- Inno Setup: open script file and look for "AppId="
- NSIS: open script file and look for "!define MUI_PRODUCT"

Then select preferred options for the updater, and specify URL of Update Information File.

Update Information File - is a plain text file (e.g. update.txt) that contains the information about new version: new version number, link to download this version, and release notes (optional). Read more here.

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. Example of update.txt file:
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.

After that, click the "Create Updater.ini" button. The Config Tool will copy the Updater.exe and Updater.ini files to the folder of the main executable file.

How Does It Work?

When Updater.exe is launched (as auto-check for updates, 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, Main Executable, or Updater.ini);
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.


update what's new

Options

Use Product Name as Updater Title - Instead of the text "Actual Updater" in the dialog / message titles, will be used your product name.

Allow users to change the updater options - Users will be able to disable / enable the automatic update function (and silent mode), change the update frequency.

Use Downloader - By deafult, a new version link will be opened in the default browser. Select this option to add the Downloader.exe file which can automatically download and launch the new version (supports command-line parameters).

Update Main Executable only - Select this option if for updating you just need to update the main executable file with the new one. Needs Downloader.exe. During the update process, the new main executable file will be downloaded and copied to the old version location. If it is launched, the Updater prompts to close the app.

Automatically check for updates - Select the preferred update frequency - on Windows startup, Once a Day, Once a Week, or Once a Month. 'On Windows startup' is performed via Windows Registry (Run section). Other options are performed via Task Scheduler. Default time of running Updater.exe is 09:00. You can change this time via Additional Parameters.

Use Smart Notification - If the user declines the new version update notification twice, there are several options available: the update program prompts the user to not being notified about this version; suggest to change the update frequency; or turn off the automatic update feature.

Additional Parameters - Specify additional parameters in this field:
-allowsilentupdate - add this to allow users to enable / disable the silent mode for the auto updates
-taskparam[params] - Sets parameters for Task Scheduler, e.g. change the deafult time to 10:00: -taskparam[/ST 10:00]
-notaskwhenavailable - add this to remove the option "Run task as soon as possible after a scheduled start is missed" for Task Scheduler.
-replacefile - Update Main Executable only
-dadmin - launch Downloader.exe as admin
-dparam[] - pass additional parameters to Downloader.exe . It's possible to pass parameters to the file that is downloaded (add /X and specify parameters for the file). /F - download multiple files. More info here.
-nocheckmainexe - Do not check if the Main Executable is launched.
-usefileversion - When using an option "Main Executable file" in "Get Currently Installed Version" will be used File Version instead of Product Version.
-nopromptautoupdate - when checking for updates with switch /A, and there is not update, the Updater prompts to use the Auto update feature. Add this parameter to disable this feature.
-envvar - replaces Environment Variables in the New Version Download Link.
-font - change font of the Updater. Default is Verdana. Example: -font[Tahoma]
-fontsize - change font size of the Updater. Default is 8. Example: -fontsize[10]
-font2 - change font of the Release Notes (What's New). Default is Verdana. Example: -font2[Tahoma]
-fontsize2 - change font size of the Release Notes (What's New). Default is 8. Example: -fontsize2[10]
-largedialog1 - option for the New Version available dialog - make it large (400x390 px).
-largedialog2 - option for the New Version available dialog - make it large (500x600 px).
-showcurver - Show the text "Currently you have version X" in the New Version available dialog.
-nobrackets - Show versions without square brackets.
-showlast - Show Release Notes (What's New) of the latest version only.
-icondef - Use the custom icon (add file "Default.ico" to the Updater.exe location) in the New Version available dialog.
-iconupd - Use the Updater Icon in the New Version available dialog.
-hidewhatsnew - Hide text "What's New" in the New Version available dialog.
-optioncolor - Set the color of the Options link to Blue.
-longbutton - Make wider the "Check for Updates" button (in case it does not fit the button size in another language).

The following parameters are used only for the feature "Check for Updates on App Launch" which is only used with Actual Installer:
-ladmin - launch Main Executable as administrator
-lparam[] - pass command-line parameters (switches) to the main executable file, e.g. -lparam[/S]
-setcurrentdir1 - set current directory to the Updater.exe directory
-setcurrentdir2 - set current directory to the main executable directory

Pass Parameters to New Version URL - add additional parameters to the link to download new version. You can also use the function GETREGVAl[] to extract a value from Registry. Example:
?x=GETREGVAL[HKEY_CURRENT_USER\Software\MyCompany\Value]
So, if the new version link is, e.g. http://www.site.com/download.html , then this function add a value from Registry to the link . Will be: http://www.site.com/download.html?x=SOMEVALUE


Command Line Parameters

By default, when Updater.exe is launched with no parameters, it displays the Product Details dialog. To check for updates, a user should click the Check for Updates button.

Updater.exe supports the following command-line parameters (switches):

/S - check for updates in the silent mode. A message appears only if an update is available. No other messages appear (including connection error). This switch is recommended to use when you want to check for updates when your application starts;

/A - automatically check for updates when the updater starts without displaying the Product Details dialog. Standard messages appear: an update is available, no updates, or errors. This switch 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 (see below);

The following switches are supported only by the Pro edition:

/F - Force update if a new version available. This will skip the update available message, and start downloading the new version (using Downloader.exe), and then launch it. Can be used with /S (silently download new version, then launch it in normal mode); /Z (silently download new version, then launch it in silent mode '/S');

/O - Open the Options dialog. If specifid "/O i", where i - is a number, then also sets the default item for the option "Automatically Check for Updates": i=0 sets "on Windows startup", i=1 - Every Day, i=2 - Every Week, i=3 - Every Month

/Init - this activates the auto update feature (via Registry or Task Scheduler) when using the Automatically check for updates feature. The update options (method, frequency) are used from the Configuration file (Updater.ini). Add a command to execute Updater.exe /Init at the end of your app Installation, or execute it once from your app.

/Remove - this deactivates (removes) the auto-update settings (Registry Keys or Task from Task Scheduler). Add a command to execute Updater.exe /Remove at the beginning of your app Uninstallation.

Note: If you use Actual Installer, you don't need to execute commands: /Init and /Remove. Setup program makes it automatically.


/CHECKAUTORUN - Checks if the option "Automatically Check for Updates on Windows startup" is enabled (return code is 10) or disabled (return code is 11). Cannot be used with switch /S

/AUTORUNON i - Turns on the option "Automatically Check for Updates" - for i=0 uses "on Windows startup", i=1 - Every Day, i=2 - Every Week, i=3 - Every Month

/AUTORUNOFF i - Turns off the option "Automatically Check for Updates" - for i=0 uses "on Windows startup", i=1 - Every Day, i=2 - Every Week, i=3 - Every Month

/AUTORUNAPP i - if i=0, then turns off the feature "Automatically Check for Updates on App Launch"; if i=1, turns it on.

You may add the feature to check for updates into your app's start section (use the /S switch), or add the menu "Check for Updates" into the app's menu Help (use the /A switch).

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

VB.NET: C#:

Process.Start("Updater.exe", "/A");

VB.NET: C#:

Dim pHelp As New ProcessStartInfo
pHelp.FileName = "Updater.exe"
pHelp.Arguments = "/A"
pHelp.UseShellExecute = True
pHelp.WindowStyle = ProcessWindowStyle.Normal
Dim proc As Process = Process.Start(pHelp)

C#:

string command = "Updater.exe";
string arg = "/A";
ProcessStartInfo start = new ProcessStartInfo(command, arg);
Process.Start(start);

C++:

Process::Start("Updater.exe", "/A");


Exit Codes

Updater.exe returns the following exit codes:

0 - No updates available

1 - Error: Configuration file not found (Updater.ini or Uninstall.ini)

2 - Error: Configuration file does not contain Product Name or URL of Update Info File

3 - Error: Unable to connect to the update server (unable to download Update Info File)

4 - Error: Incorrect Update Info File. Make sure that Update Info File is a plain text file, not HTML, RTF, or other type

5 - Update available


Advanced features are available in Actual Updater Pro.