The Advanced Updater is a small executable tool whose role is
to check for updates, inform the user of their presence and offer to
download and install them. When launched, the Updater checks if a newer
version of the application exists by using a predefined
criteria. When you decide to add the automatic updates capability to your
application, a copy of the Updater (having the name you specify) and the
INI configuration file will be inserted into the install
package. Updater optionsThe Updater has the following command line
option: - /checknow - The Updater is launched, pops up a
dialog box, checks for updates and automatically informs the user
that new updates are available. If no updates are available, the
Updater will exit immediately.
- /silent - The Updater will search silently for
updates at the interval specified by the user. The search interval
can be specified in the Configuration dialog. By default it is the
value you specified in the "Check Frequency" field (Updater). If the check frequency has
not passed or there are no updates available, the Updater will exit
immediately.
- /silentall - The Updater will search silently for
updates and automatically install all updates. This has the has the
same effect as the /silent option if the user has selected the
"Check and automatically install all updates" option in the
configuration dialog. If the check frequency has not passed or there
are no updates available, the Updater will exit immediately.
- /silentcritical - The Updater will search silently
for updates and automatically install only critical updates. This
has the has the same effect as the /silent option if the user has
selected the "Check and automatically install critical updates"
option in the configuration dialog. If the check frequency has not
passed or there are no updates available, the Updater will exit
immediately.
- /justcheck - The Updater just checks if new updates
are available and uses a return code to tell that (See the "Updater
return codes" section). This check is silent without UI. The user is
not prompted to download or install updates. Start the updater using
/checknow, /silent,
/silentall or /silentcritical if you
want to download and install updates.
- /configure [HWND] - the Configure dialog will be
displayed allowing the configuration of the Updater. In this dialog
the user can specify the download folder, the check frequency,
enable or disable the automatically update option. This command line
could be used with an optional parameter that specifies the parent
window handle (HWND) for the "Updates Options" dialog. This
parameter is of unsigned integer type.
When using the /silent parameter, the Updater
will check for updates at its first launch. After that, a check is
performed only if the specified check frequency has passed (usually
its 2 days). No matter how many times the Updater is launched in this
period, it will simply exit. If the Updater is launched after the
check frequency passes, it will check for updates. If it finds any
updates it will prompt the user for them, otherwise it will
exit. Updater command line switches: - -nofreqcheck - If this switch is specified in the
updater's command line, the frequency check is skipped. It can be
used with the /silentall and
/silentcritical command line options.
- -url url_location - If this command line is used
the Updates Configuration File url from
the updater configuration INI file will be replaced with the one
specified after this switch. It can be used with the
/checknow, /silent,
/silentall and /silentcritical command
line options.
- -minuseractions - If this switch is specified the
user interaction is minimized. The dialogs "Please Wait..." and
"Error" will not be displayed. It can be used with the
/checknow command line option.
- -licenseid license_id_string - Using this command
line you can specify the license id string that is used for License Check directly
in command line. You can not specify both the license id string
directly in command line and registry path from where to extract
license id.
- -licensecheckurl license_check_url - Using this
command line you can specify the license check URL used for License Check directly
in command line. License check URL specified in command line has
priority over the one specified in Updates Configuration File.
- -dumpdetected file_path - In this file is stored
the information about the detected updates. The format of the file
is the same as the format of Updates Configuration File file. It can be used only with the
/justcheck command line option. If the file already
exists it will not be overwritten.
Examples: - updater.exe /silentall -nofreqcheck
- updater.exe /checknow -url
http://www.example.com/updates.aiu
The old command line options: /m checknow, /m silent, /m
configure are still supported but deprecated. It is
recommended to use the new command line options.
User authenticationYou can restrict the user's access to the updates configuration file or an
update file using username/password authentication. The user will be
prompted to enter the password. The updater can remember the password,
if the user chooses to do so. The password sent by the updater to the server is not secured.
It is sent as plain text.
Automatically download and install some types of updatesThis option is enabled by selecting the “Check and
automatically download and install” option from the
“Configure” dialog. You have two choices: Critical
or All. An update can be marked as critical using flag Critical in
Flags entry from updates configuration
file. Automatically close the updated applicationThe updater can automatically close the updated application.
The path to the application that must be closed is specified in the
updates configuration file in
the "AutoCloseApplication" entry. Using the UpdaterThe Updater should be launched from within your application
with one of the above command line options. For example, you could add a menu option that will launch the
updater. In order to do that just execute the Updater tool with the
"/checknow" command line, when that menu option is
selected. When launched, the Updater automatically downloads from the
URL location specified in the "Update URL" field (Updater), the updates configuration
file. After the INI file is downloaded the Updater checks for newer
versions of the application. If they exist the user is informed of
their presence. Then the Updater gives you the possibility to select
the files that you want to install. After selecting the desired files, the update process begins
and the files are downloaded and installed. Updater return codesThe return codes can signal status information or
errors Status Information - 0 - Found updates for application
- 0xE0000011 - No updates are available for the
application.
Updater specific error codes: - PATH_EXPAND_ERROR (E0000001) - Unable to expand a
dynamic path.
- CONFIG_FILE_NOT_FOUND (E00000002) - Unable to find
the updater configuration file. It should be located near the
updater.exe.
- UNDEFINED_CONFIG_FILE_FORMAT (E00000003) - The
updates configuration file
format is invalid.
- UNDEFINED_FILE_VERSION (E00000004) - The updater is
unable to extract a file version.
- UNABLE_TO_SAVE_FILE (E00000005) - The updater is
unable to save a file.
- INVALID_COMMAND_LINE (E00000006) - The command line
is not recognized.
- INVALID_CLIENT_CONFIG (E00000007) - The updater
configuration file is invalid. It is required that certain entries
must not be empty.
- INVALID_SERVER_CONFIG (E0000000E) - The signature
of the updates configuration
file is missing or is invalid.
- ERROR_INVALID_UPDATE_ENTRY (E00000014) - The updates configuration file is
invalid. It is required that certain entries must not be
empty
Windows error codes - Check the Windows SDK documentation to see error
description
Topics |