New Registry Entry Command Option

Command Syntax

/NewReg  { [-RegKey <registry_key>] | [-RegValue <registry_value_name>] }
         [-Data <registry_data>] [-64bit]

Creates a new registry entry.

Parameters:

  • [-RegKey <registry_key>]
  • The path of the registry key. This string should have one of the following terminators:
    • "\+"
    • By using this terminator the registry key will be created when the component installs only if the registry key is previously absent. This corresponds with the Create (if absent) at install checkbox from the registry key properties tab in Advanced Installer.
    • "\-"
    • By using this terminator the registry key, along with all its values and subkeys, will be deleted when the component uninstalls only if the registry key was previously present. This corresponds with the Delete (if present) at uninstall checkbox from the registry properties tab in Advanced Installer.
    • "\*"
    • This is a mix of the above "\+" and "\-" terminators. When it is used the registry key will be created when the component installs if it was previously absent and will be deleted on the component uninstall if it previously existed.
  • [-RegValue <registry_value_name>]
  • The registry value's path.
  • [-Data <registry_data>]
  • The registry value's data. It embeds the value and the data type by using the following format:
    • "#x"
    • The value is interpreted and stored as a hexadecimal value (REG_BINARY).
    • "#%"
    • The value is interpreted and stored as an expandable string (REG_EXPAND_SZ).
    • "#"
    • The value is interpreted and stored as an integer (REG_DWORD).
  • [-64bit]
  • Specifies that the component associated to this registry entry will be created as a 64-bit component.

Creating a new Registry Key example:

AdvancedInstaller.com /edit MyProject.aip
    /NewReg -RegKey HKUD\Software\[Manufacturer]\[ProductName]
    \MyRegkey\*

Creating a new Registry value example:

AdvancedInstaller.com /edit MyProject.aip
    /NewReg -RegValue HKUD\Software\MyKey\MyValue -Data #x100