The Advanced Installer command line allows you to build or edit projects without using the graphical interface.

Building from command line

In order to build a MSI from command line, you can use the following syntax:

[<path>\]AdvancedInstaller.com /build <project_file_path> 
  { [-buildslist <builds_list>] | [-configurationslist <configurations_list>] }

Parameters:

  • <path>
  • Path to Advanced Installer executable.
  • <project_file_path>
  • Path to project file.
  • -buildslist <builds_list>
  • Perform a set of builds. All builds are performed if no build is specified.
    • <builds_list>
    • list of builds that should be performed; build names should be separated by semicolon (";") characters
  • -configurationslist <configurations_list>
  • Build a set of configurations. For WinCE projects only. All configurations are build if no configuration is specified.
    • <configurations_list>
    • list of configurations to build; configuration names should be separated by semicolon (";") characters

Deprecated:

  • -force
  • This parameter has been deprecated. In order to perform a clean rebuild use the /rebuild command.

Important The order of the parameters in a command line syntax must be respected. If the parameters are written in any other order, the obtained result will not be the one intended.

Performing a clean Rebuild

In order to build the project regardless whether the project was modified and without using any cached files, you can use the following syntax:

[<path>\]AdvancedInstaller.com /rebuild [project_file_path] 
  { [-buildslist <builds_list>] | [-configurationslist <configurations_list>] }

ANT integration

In order to include Advanced Installer in an ANT build you can add the following target to your build.xml file:

<target name="advinst">

<exec executable="[path]\AdvancedInstaller.com">
    <arg line="/build [project].aip"/>
  </exec>

</target>

Load Custom Path Variables

Load a list of Path variables to be further used by Advanced Installer.

[<path>\]AdvancedInstaller.com /loadpathvars <path_variables_file_path>
  • /loadpathvars <path_variables_file_path>
  • Loads a new set of path variables from the specified file (XML file).

In order to create a XML file containing your custom path variables you must first create the path variables and use "Save To..." command available in Path Variables Editor.

Executing a file of commands

You can specify a text file containing a series of edit commands that will be executed in sequence.

In order to execute a file of commands you can use the following syntax:

AdvancedInstaller.com /execute <path_to_project_file> <command_file_path> [-nofail]

Parameters:

  • <path_to_project_file>
  • Path of the project to edit.
  • <command_file_path>
  • Path of the commands file.
  • -nofail
  • Display all the errors but do not interrupt the execution of the commands file.

When creating a file of commands there are some rules that must be taken into consideration:

  • The first line of the file must be ;aic
  • One of the following encodings must be used:
    • ANSI
    • Unicode

Apart from the usual edit commands, inside the commands file you can use four more command options:

SaveSaves the project.
BuildBuilds the project.
RebuildPerforms a clean rebuild of the project.
ResetSigResets the digital signature. The effect of this command is equivalent to unchecking the option “Sign the package” in the Digital Signature page. This is useful for instance in release candidate builds when signing the package and/or installation files is not required.

To point the location for your files you can also use environment variables, using the separator “&“, like we use for the variable “SAMPLE“ in our example. If your environment variable contains a path with whitespaces then you should use quotes for the entire path.

Example:

;aic
SetVersion 1.2
AddFile APPDIR\MyFolder C:\Folder\File.txt
AddFile APPDIR\MyFolder “&SAMPLE&File.txt“
SetProperty TESTPROP="TestValue"
Save
Rebuild

NoteThe project will not be modified by the edit commands specified in an AIC file. The Save command must be used explicitly in order to persist the project state after a sequence of edit commands (if this is desired).

Displaying the command line help

Use the following syntax to display the usage for the available command line options:

AdvancedInstaller.com { /help | /? } [<command>]

Topics

  • Editing
    How to edit Advanced Installer projects with command line commands.