Examples of Updates Configuration File
Common Configuration Examples
The following examples represent common configurations that can be used when configuring the Updater INI file on the server.
Minimal Configuration
This is the updater's minimal configuration file. With this configuration, the updater will always prompt "Your software is up to date" message.
;aiu;
Simple Configuration
This is an example of the simplest configuration. The name for the update, the URL where to download it and the exact file size are the only ones provided. The problem is that the Updater will only check for the existence of the MyEditor file, but has no way of telling between different versions of the file.
;aiu; [MyEditor45] Name = MyEditor 4.5 URL = http://www.myeditor.com/download/myeditor.msi Size = 3023788 FilePath = c:\ProgramFiles\MyEditor\MyEditor.exe
Common Configuration
This is an example of a common configuration. A way to check if this version is already installed is provided. The Updater will verify the version of the MyEditor file. Its path is given using an environment variable.
A description for the update and a list of feature and bug-fixes that this version comes with are also provided.
;aiu; [MyEditor45] Name = MyEditor 4.5 URL = http://www.myeditor.com/download/myeditor.msi Size = 3023788 Description = This is the latest version of MyEditor Feature = Support for other file types Feature1 = Support for different encodings BugFix = Fix bug with file open BugFix1 = Fix crash when opening large files BugFix2 = Fix bug with search in file feature FilePath = %ProgramFiles%\MyEditor\MyEditor.exe Version = 4.5
Configuration with File Size Check
This configuration is set to compare the file size to determine if the latest version is installed. The location of the MyEdit.exe file is given using the [APPDIR] value.
;aiu; [MyEditor45] Name = MyEditor 4.5 URL = http://www.myeditor.com/download/myeditor.msi Size = 3023788 FilePath = [APPDIR]MyEdit.exe FileSize = 610304
Configuration with Version Given by a Registry Value
This configuration will compare the 4.5 version to the one stored in the "Version" registry value in the HKLM\Software\MyEditor\Information key. If the version stored in the key is greater or equal to the one provided the update is not to be installed.
;aiu; [MyEditor45] Name = MyEditor 4.5 URL = http://www.myeditor.com/download/myeditor.msi Size = 3023788 RegistryKey = HKLM\Software\MyEditor\Information\Version Version = 4.5
Configuration with Integrity Check Using MD5
This configuration file will compare the MD5 "fingerprint" of the file to determine whether the update file was downloaded correctly. This update is also marked as critical.
;aiu; [MyEditor45] Name = MyEditor 4.5 URL = http://www.myeditor.com/download/myeditor.msi Size = 3023788 MD5 = e944a9cb690d9c4e92486298c90a083f RegistryKey = HKLM\Software\MyEditor\Information\Version Version = 4.5 Flags = Critical
Configuration with Update File on a Local Network Location
;aiu; [MyEditor45] Name = MyEditor 4.5 URL = file://\\computername\download\myeditor.msi Size = 3023788 RegistryKey = HKLM\Software\MyEditor\Information\Version Version = 4.5
Advanced Functionality Examples
License Validity Check
This configuration will enable the updater to verify the user's license. It verifies whether the license is valid and has not expired. The release date of the update is given by the "ReleaseDate" entry. This date is verified against the license expiration date received by the updater as a command line parameter. The license validity check is done by the PHP script located by the LicenseIDCheckURL entry.
;aiu; [General] LicenseIDCheckURL = http://www.myeditor.com/check/license_check.php [MyEditor45] Name = MyEditor 4.5 URL = http://www.myeditor.com/download/myeditor.msi Size = 3023788 RegistryKey = HKLM\Software\MyEditor\Information\Version Version = 4.5 ReleaseDate=25/03/2005
Temporarily Disable Updates
This configuration file will disable updates temporarily and display a message to the user.
;aiu; [General] UpdatesDisabled = Updates are not available at this time [MyEditor45] Name = MyEditor 4.5 URL = file://\\computername\download\myeditor.msi Size = 3023788 RegistryKey = HKLM\Software\MyEditor\Information\Version Version = 4.5
For more examples, also check this article: Sample Updates Configuration File For An EXE Application.