Update Prerequisite Option

Command Syntax

/UpdatePrerequisite <display_name>
                 [-builds <builds_list>]
                 [-display_minversion <min_version>]
                 [-display_maxversion <max_version>]
                 [-type {PreInstall|FeatureBased|PostInstall}]
                 [-reboot_after_install {Always|IfInstalled|None}]
                 [-ui_level {Full|BasicProgress|Silent|MainPackage}]
                 [-basic_ui_switch <basic_ui_switch>]
                 [-silent_ui_switch <silent_ui_switch>]
                 [-force_install]
                 [-lzma_compression]
                 [-setup_location {FileBased|UrlBased|OpenSite}]
                 -prereq_path <prereq_path>
                 [-extract_folder <extract_folder>]
                 [-aditionalfiles <aditional_files>]
                 [-size <prereq_file_size>]
                 [-md5 <prereq_file_md5>]
                 [-cmd_line <cmd_line>]
                 [-target_os {WinNT|Win64}]
                 [-search_type {FileVersion|RegSubKeyEnum|RegValue|ProductCode|UpgradeCode}
                 [-search_path <search_path>]
                 [-search_depth <search_depth>]
                 [-minversion <minimum_version>]
                 [-maxversion <maximum_version>]
                 [-64bit]
                 [-prereq_key <prereq_key>]
                 

This command will update a prerequisite from your package.

Parameters:

  • <display_name>
  • The name of the prerequisite you want to update. This string will be visible to the user.
  • [-builds <builds_list>]
  • A list of builds to which this prerequisite should be added. If no build is specified, the prerequisite will be added to all the defined builds.
  • [-display_minversion <min_version>]
  • The minimum version required, for the prerequisite to be installed.
  • [-display_maxversion <max_version>]
  • The maximum version required, for the prerequisite to be installed.
  • [-type {PreInstall|FeatureBased|PostInstall}]
  • Sets the type of the prerequisite. For more information about each type see the Prerequisites Page - Installer Project.
  • [-reboot_after_install {Always|IfInstalled|None}]
  • Specify the reboot behaviour after install : Always, If Installed or None. This option only works in conjunction with -type "PreInstall" option. To use this option is is mandatory to specify -search_type
  • [-ui_level {Full|BasicProgress|Silent|MainPackage}]
  • Specify the UI level of the prerequisite : Full UI, Basic UI and Progress, Silent (no UI), Same as Main Package UI
  • [-basic_ui_switch <basic_ui_switch>]
  • Specify the command line switch used for Basic UI installation.
  • [-silent_ui_switch <silent_ui_switch>]
  • Specify the command line switch used for Silent UI installation.
  • [-force_install]
  • If this is set the product install operation will not start until the prerequisite is installed.
  • [-lzma_compresion]
  • Specify LZMA Compression for your prerequisites files. To use this option your prerequisite files must be included in the EXE bootstrapper. This parameter can be used only with FileBased option.
  • [-setup_location {FileBased|UrlBased|OpenSite}]
  • Specifies the location of the prerequisite setup file. The default value is FileBased.
  • -prereq_path <prereq_path>
  • The exact path or URL to the prerequisite setup file.
  • [-extract_folder <extract_folder>]
  • The location where the prerequisite files will be extracted or downloaded. This parameter cannot be used with OpenSite option.
  • [-aditionalfiles <aditional_files>]
  • A list with additional files for your prerequisite. The files are separated by "|". If you have more than one file include this parameter into quotes. Those files need to by placed next to the file specified in the prereq_path parameter. This parameter can be used only with FileBased option.
  • [-size <prereq_file_size>]
  • The exact size of the prerequisite setup file. This parameter can be used only with UrlBased option.
  • [-md5 <prereq_file_md5>]
  • This field contains the MD5 "fingerprint" of the prerequisite file. This parameter can be used only with UrlBased option.
  • [-cmd_line <cmd_line>]
  • An optional command line for launching the prerequisite. This parameter cannot be used with OpenSite option.
  • [-target_os {WinNT|Win64}]
  • Specifies which Operating System is required for this prerequisite to run. Don't specify this parameter if the prerequisite is for all type of OS.
  • [-search_type {FileVersion|RegSubKeyEnum|RegValue|ProductCode|UpgradeCode}]
  • A value specifying how to obtain the installed prerequisite's version. The following parameters can be specified only when this parameter is specified.
    • [-search_path <search_path>]
    • Path to a file or registry value from where to get the prerequisite version.
    • [-search_depth <search_depth>]
    • How deep to search for a file in the subdirectories. This parameter can be used only with FileVersion option.
    • [-minversion <minimum_version>]
    • The minimum version necessary for the installed prerequisite to be accepted.
    • Please note that it is mandatory to specify <search_path>_parameter as well in order for the application to know for which search to update the minimum version.
    • [-maxversion <maximum_version>]
    • The minimum version necessary for the installed prerequisite to be accepted.
    • Please note that it it is mandatory to specify <search_path>_parameter as well in order for the application to know for which search to update the maximum version.
    • [-maxversion <maximum_version>]
    • [-64bit]
    • Searches 64-bit registry or file locations.
    • [-prereq_key <prereq_key>]
    • The ID of the prerequisite. Optional parameter used to identify a prerequisite in case the prerequisite is not found by name.

Example:

AdvancedInstaller.com /edit "C:\\Users\\Caphyon\\Desktop\\Your Application.aip" /UpdatePrerequisite "Visual C++ Redistributable for Visual Studio 2015-2022 x86" -minversion "14.42.34433" -prereq_path "C:\\Users\\Catalin\\Documents\\Advanced Installer\\Projects\\Your Application\\Prerequisites\\Visual C++ Redistributable for Visual Studio 2015-2022\\VC_redist.x86.exe"
-search_path "HKLM\SOFTWARE\Microsoft\DevDiv\VC\Servicing\14.0\RuntimeMinimum\Version"