Loading ...

Deployment of Acumatica instances via Command-Line Tool

The Acumatica Configuration Wizard is commonly used to deploy and maintain instances. However, there is another tool that can be used for that – Command-Line Tool provided by Acumatica.

So, first of all, you need an Acumatica ERP instance. You can install it as usual, or you can extract the content of the MSI file with the Windows built-in tool – msiexec, without installation. This will allow you to keep different versions of ERP and the Configuration Wizard at the same time.

The following command will extract files from an MSI package without installation:

msiexec /a C:\path\to\file.msi TARGETDIR=C:\path\to\folder /qb

The command line tool (executable name ac.exe) by default located in the Data folder inside the Acumatica ERP directory:  {path to Acumatica ERP folder}\Data.

 

Now it’s time to use that tool. For example, this command will install a new instance with the Sales Demo data set:

ac.exe -cm:"NewInstance" -s:"DatabaseServerName" -dbname:"DatabaseName" -company:"CompanyID=1;" -company:"CompanyID=2;ParentID=1;Visible=Yes;CompanyType=SalesDemo;LoginName=Company;" -i:"InstanceName" -ipath:"Path\To\Instance" -w:"Default Web Site" -svirtdir:"InstanceName" -spool:"DefaultAppPool"

Here is a quick description of some parameters:

-cm (shortcut for -configmode): "NewInstance" – indicates that we want to install a new instance;

-w (shortcut for -swebsite) : "Default Web Site" – specifies the name of the existing Internet Information Services (IIS) website on the local computer.

-svirtdir – specifies the name of the IIS virtual directory. If there is no such virtual directory in IIS, this directory will be created on the local IIS.

-spool – specifies the name of the IIS application pool.

It creates two tenants with -company parameters.

"CompanyID=1;" – system tenant, which the Configuration Wizard inserts by default.

"CompanyID=2;ParentID=1;Visible=Yes;CompanyType=SalesDemo;LoginName=Company;" – our working tenant with the Sales Demo data set.

It’s important to note one detail that isn’t clear from the documentation: CompanyType parameter is used to specify the data set that will be inserted during installation.

You can find official documentation and parameter descriptions on the Acumatica help portal – Using the Command-Line Tool.

 

With this tool, the process of deploying new instances can be much faster, as you don’t have to follow the exact same steps manually every time. You can go even further and create tools that will use that command line tool under the hood, such as batch scripts or programs written in C# or Python.

Summary

• Acumatica provides a Configuration Wizard and Command-Line Tool to deploy and maintain instances;
• The Command-Line Tool can be used to extract the content of an MSI file without installation;
• This tool can also be used to quickly install new instances with the Sales Demo data set;
• Parameters such as 'CompanyID', 'ParentID', 'Visible' and 'CompanyType' are used to specify the required data set to be inserted during installation;
• Specialized tools like scripts or programs written in C# or Python can also use this command line tool.