In this tab, you can specify the detection method for the updates. It is used by the Updater to determine whether an update is installed or not. If the comparison condition is true, the update is considered installed, and its download is stopped.
The "Detect if the update is already installed by running a" combobox allows you to select between four possible options, each detailed below.
Registry Value Search
By selecting this option, the install detection will be performed by running a registry value search.
Registry Value - The location in the registry where the version is stored. It corresponds to the "RegistryKey" key from the Updates Configuration File. You can either specify it directly or use the button to select it.
The default search uses HKUD registry hive, which makes the Updater check both HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE. If you want to check only a specific hive you can use HKCU for HKEY_CURRENT_USER and HKLM for HKEY_LOCAL_MACHINE.
The recommended installed detection criteria are this:
- In the original installation package, you create a registry entry which contains the version of the package (you can use the ProductVersion property).
- In the "Installed Detection" section of the Updates configuration project use this registry value as a detection criteria.
- You set the version of the update package as the additional criteria.
This way the Updater will verify which version of the package is installed.
Expected value - The registry value used for comparison.
64-Bit - This checkbox enables the Updater to detect if the update was installed using the 64-bit registry on a 64-bit OS.
If you are using a 64-bit registry entry, make sure you enable the 64-bit option. Otherwise only 32-bit registry entries will be checked on a 64-bit machine.
File Version Search
By selecting this option, the install detection will be performed by running a file version search.
File Path - The location of the file that must be present for the update process to be considered successful. It corresponds with the "FilePath" key from the Updates Configuration File. This string can contain the following references:
- [APPDIR] - The default path where the application is installed. This detection criteria might fail if the user will change the install default location.
- Environment Variables - Enclose the environment variable name in "%".
- ProductCode and ComponentId - If the update is an MSI file, you can use the
component ID associate with a resource to detect whether if the resource is installed.
The string should have the following format:
Expected value (Version) - The file version used for comparison. It can be directly specified or you can get it from a file. Use thebutton to select the file.
File Size Search
By selecting this option, the install detection will be performed by running a file size search.
File Path - This field has the same format as its correspondent from the File Version Search section above.
Expected value (File Size) - The size of the file used for comparison. It can be directly specified or you can get it from a file. Use thebutton to select the file. A match in the file size means that the update is installed.
Because a mismatch in the file size is automatically viewed as a missing update, you should always use the “Add Update > Replaces” context menu ortoolbar button option for the newer updates. This way you'll avoid older updates being installed just because the file size was different after installing a newer update.
By selecting this option, the install detection will be performed using your own custom EXE file. It corresponds to the "CustomDetection" key from the Updates Configuration File. The custom EXE must set the exit code to be different from zero if the update is already installed, otherwise set to zero. This way, the Updater will run the executable and use its exit code to determine if the update is installed or not.
The custom EXE must be signed using the same certificate as updater.exe otherwise an error will be reported.
EXE Path - Location of the executable file. The string has the same format as the "File Path" field from the File Version Search section above.
Arguments - Command line parameters used when running the custom detection executable.
An MSIX/APPX application search
By selecting this option, the install detection will be done by searching for an installed MSIX/APPX application.
Application Name - the application name for the app as it appears displayed to users.
Version - The version number of the package in quad notation.
Processor Arch - Select the architecture of the code contained in the application.
Resource Id - The globally unique identifier name for the application.
Publisher Id - The publisher subject information of the certificate used to sign the package.
Do not try to detect if the update was installed
This option disables detecting the update installation after the update was installed.