Add UpgradeCode Command Option

Command Syntax

/AddUpgradeCode <upgrade_code>
      [-min_ver <min_version>]
      [-include_min_ver]
      [-max_ver <max_version>]
      [-include_max_ver]
      [-include_lang <language_id>]
      [-exclude_lang <language_id>]
      [-feature_id <feature_id>]
      [-detect_only]
      [-property_name <property_name>]
      [-enable_migrate]
      [-continue_on_failure]
      

This command will add a new Upgrade Code to your project. Its equivalent UI option is the [ New... ] button from Upgrades page.

Parameters:

  • <upgrade_code>
  • The GUID of the Upgrade Code.
  • [-min_ver <min_version>]
  • The minimum old product version which will be upgraded. For example, if the minimum version is 1.1 then your package will upgrade all the old product versions which are higher than 1.1.
  • [-include_min_ver]
  • Set this flag to include the minimum version you specified in the old product versions which will be upgraded. For example, if the minimum version is 1.1 then your package will upgrade all the old product versions which are equal to or higher than 1.1.
  • [-max_ver <max_version>]
  • The maximum old product version which will be upgraded. For example, if the maximum version is 2.0 then your package will upgrade all the old product versions which are lower than 2.0.
  • [-include_max_ver]
  • Set this flag to include the maximum version you specified in the old product versions which will be upgraded. For example, if the maximum version is 2.0 then your package will upgrade all the old product versions which are equal to or lower than 2.0.
  • [-include_lang <language_id>]
  • A list of comma-separated language IDs. Only these languages will be considered when searching for old products.
  • [-exclude_lang <language_id>]
  • A list of comma-separated language IDs. The specified languages will be ignored when searching for old products.

NoteIf neither -include_lang nor -exclude_lang switch is used, then all the languages will be considered when searching for old products.

  • [-feature_id <feature_id>]
  • A comma-separated list of feature IDs. These are the features to remove/detect from the old product.
  • [-detect_only]
  • The old product will only be detected, but not removed. The detected product will be stored in the associated action property specified through the -property_name switch.
  • [-property_name <property_name>]
  • The property that will contain the Product Code of the package found on the system. Windows Installer will find only the installed package which uses the Upgrade Code specified in the "Product Info" tab.
  • [-enable_migrate]
  • The Migrate Feature action is used during upgrading and when installing a new application over a related application. Migrate Feature reads the feature states in the existing application and then sets these feature states in the pending installation. The method is only useful when the new feature tree has not greatly changed from the original. This option also applies to the features specified through the -feature_id switch.
  • [-continue_on_failure]
  • Set this flag to continue the installation when an old product cannot be removed.

Example:

AdvancedInstaller.com /edit MyProject.aip
        /AddUpgradeCode {E147398F-454D-4DF7-9E62-91647934B9E0} -min_ver 1.0 -max_ver 3.0 -include_max_ver -exclude_lang 1034 -property_name MY_UPGRADE -enable_migrate -continue_on_failure