Working with Advanced Installer from the Command Line

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

1. Creating a new project

The new project command line syntax is:

<path> /newproject <project_file_path>
  { [-type <project_type>] [-lang <project_language>] }  


  • <path>
  • Path to Advanced Installer executable.
  • <project_file_path>
  • Path to project file (e.g. "C:\Users\Caphyon\Desktop\Advanced Installer\project.aip"). This parameter's value must point to an existing full path, otherwise the operation will fail.
  • -type <project_type>
  • Specify the project type.
    • <project_type>
    • The project type. The string can be either of the available project type names in Advanced Installer: professional, java, enterprise, architect, patch, msm, update, win-ce, vsix. For the "Simple" project type you must omit the -type switch (e.g. /newproject simpleProject.aip)
  • -lang <project_language>
  • Specify the project language.
    • <project_language>
    • The project language (e.g. "en" for English, "ru" for Russian, etc.).
  • -overwrite
  • Include this parameter to silently overwrite any existing project with the same name from the specified location. If this parameter is not specified and a project with the same name already exists, an exception will be thrown.
  • -template <template_name>
  • Specify the existing template used for creating the new project.
    • <template_name>
    • The template name. The string must be the name of one of your saved custom templates from Advanced Installer Start Page.

ImportantThe -template parameter is incompatible with -type and -lang parameters

ImportantThe 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.

2. Building from command line

In order to build an MSI from command line, you can use the following syntax: /build <project_file_path>
  { [-buildslist <builds_list>] | [-configurationslist <configurations_list>] }


  • <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

2.1 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: /rebuild [project_file_path]
  { [-buildslist <builds_list>] | [-configurationslist <configurations_list>] }

3. Return codes

For a list of Advanced Installer's command line error return codes, please follow Command line return codes article.

4. 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]\">
    <arg line="/build [project].aip"/>


5. Load Custom Path Variables

Load a list of Path variables to be further used by Advanced Installer. /loadpathvars <path_variables_file_path>
  • <path_variables_file_path>
  • Loads a new set of path variables from the specified file (XML file).

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

6. 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: /execute <path_to_project_file> <command_file_path> [-nofail]


  • <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 the following 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 unticking the option “Enable signing” 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.
SetSigOpposite for command ResetSig. The effect of this command is equivalent to ticking the option “Enable signing” in the Digital Signature page.

NoteTo 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.

6.1 Example

SetVersion 1.2
AddFile APPDIR\MyFolder C:\Folder\File.txt
AddFile APPDIR\MyFolder “%SAMPLE%File.txt“
SetProperty TESTPROP="TestValue"

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).

7. Convert MSI to virtualized package

Using the Architect edition you can create virtualized packages (AppV 4.x, AppV 5.x and ThinApp) from MSI packages not created with Advanced Installer. This can be scripted so everything is done automatically, as in the following commands file example:

SetOutputLocation -buildname "BuildAppV5" -path "C:\Work\Virtualized Packages\SamplePackage"
Build -buildslist "BuildAppV5"

To execute this command file you would call the following: /execute <path_to_MSI_file> <command_file_path>

In the sample from above you see the command ”SetOutputLocation” used to set the folder where you want the virtualized package to be generated, and the command ”Build” used to trigger the build operation of the virtualized page. For both commands you should use only one of the following three build names:

  • BuildAppV5 - trigers the conversion of the MSI to an AppV 5.x package
  • BuildAppV4 - trigers the conversion of the MSI to an AppV 4.x package
  • BuildThinApp - trigers the conversion of the MSI to a ThinApp package

8. Run the installer in a virtual machine

In order to test the installer in a virtual machine, you can use the following syntax: /RunInVM <project_file_path>
   [-build name] -vmprofile {GUID} [-quiet]


  • <path>
  • Path to Advanced Installer executable.
  • <project_file_path>
  • Path to project file.
  • -build name
  • Optional parameter used to launch a specified build for testing. If this switch is not specified, the default build will be launched for testing.
  • -vmprofile {GUID}
  • The unique identification number for the profile. Chek the profile GUID in the VM Profile Options.
  • -quiet
  • The VM Launcher dialog is not displayed.

9. Register Advanced Installer using the command line

To activate Advanced Installer you can use the following syntax: /register <license_id>
  • <license_id>
  • The license ID which you received after purchasing Advanced Installer.

When there's no Internet connection, the following option applies: /RegisterOffline <file_path>
  • <file_path>
  • The path of the license file you received from support.

To register with a floating license the syntax is: /registerfloating <host>:<port>
  • <host>
  • The license server host name.
  • <port>
  • The license server port number.

Optionally, with a floating license, you can use a proxy server to connect through. The syntax is: /cfglicensesrvproxy [-set <host>:<port>] | [-disable]
  • -set <host>:<port>
  • Set a proxy server to connect through.
    • <host>
    • The proxy server host name.
    • <port>
    • The proxy server port number.
  • -disable
  • Disable connecting through the proxy server.

10. Setting the Repository path

To set the Repository path you can use the following syntax: /SetRepositoryPath <path> [-move]


  • <path>
  • The new path on disk of the Repository. When used without the -move switch it changes the location without moving the existing Repository resources to the new location.
  • -move
  • When used it changes the location and moves the existing Repository resources replacing the identical ones.

11. Getting the Repository path

To get the Repository path you can use the following syntax: /GetRepositoryPath

12. Displaying the command line help

Use the following syntax to display the usage for the available command line options: { /help | /? } [<command>]

13. Refresh synchronized folders

Use the following syntax to refresh the synchronized folders in your project: /edit <project_file_path> /RefreshSync [<target_folder_path>]

14. Change the package output type

To change the package type from command-line use the following syntax: /edit <project_file_path> /SetOutputType <packageType> [-buildname <build_name>] [-msi_url <msi_url>] 

Package types: MsiInside, MsiOutside, ExeInside, ExeOutside, and WebInstaller

-buildname is optional, if not specified, the command applies to the current build

-msi_url is required only for the WebInstaller package type

14.1 Example

"C:\ai\win\Debug\bin\x86\" /edit "Your Application.aip" /SetOutputType WebInstaller -buildname MsiBuild -msi_url ""


  • Return codes
    The list of return codes for Advanced Installer command line operations.
  • Editing
    How to edit Advanced Installer projects with command line commands.