The Advanced Installer command line allows you to create, build or edit projects without using the graphical interface.
Creating a new project
The new project command line syntax is:
[<path>\]AdvancedInstaller.com /newproject <project_file_path>
{ [-type <project_type>] [-lang <project_language>] } Parameters:
- <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 (e.g. "simple" for a Simple project type, "professional" for Professional, etc.).
- -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.
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.
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.
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>
- <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 the following command options:
| Save | Saves the project. |
| Build | Builds the project. |
| Rebuild | Performs a clean rebuild of the project. |
| ResetSig | Resets 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. |
| SetSig | Opposite for command ResetSig. The effect of this command is equivalent to ticking the option “Enable signing” in the Digital Signature page. |
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
The 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).
Register Advanced Installer using the command line
To activate Advanced Installer you can use the following syntax:
AdvancedInstaller.com /register <license_id>
- <license_id>
- The license ID which you received after purchasing Advanced Installer.
To register with a floating license the syntax is:
AdvancedInstaller.com /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:
AdvancedInstaller.com /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.
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.