Command line installation - XML configuration
This page provides a reference and specification for the XML files used as a configuration source by the command line installation.
You can create the XML file from scratch or during the installation procedure using the Save XML configuration link.
Attribute values
When entering the values of boolean attributes, always use “true” or “false”. Other types of values are not supported.
You can use macros in the following XML attributes to get the respective values dynamically:
- SilentInstall -> LogFile
- Setup -> SetupFolder
- IIS -> TargetFolder
- Sql -> Database
Macro expression | Description | Sample resolved value |
{%productversion%} | Xperience version number according to Semantic Versioning. | 13.0.0-alpha |
{%fileversion%} | Full version number of the installed Xperience version. | 13.0.5191.17572 |
{%programfiles%} | Path to the Program Files folder on your local drive. | c:\Program Files (x86)\ |
{%machine%} | Name of the current machine. | PC01 |
{%username%} | User name of the currently used account. | Andy |
{%date%} | Current date in format yyyy-mm-dd. | 2019-01-21 |
{%time%} | Current time in format hh-mm-ss. | 14-53-23 |
Note that these macros are completely unrelated to the standard Xperience macros that can be used in the system’s administration interface.
XML elements
SilentInstall
The root element of the XML file is SilentInstall. Using the attributes of this element, you can configure general options of the installation:
Attribute | Description | Accepted values | Required? |
ShowProgress | Determines if the Silent Install tool displays the progress of the installation or not.
| No | CommandPrompt | Yes |
Log | Enables logging of import progress to a file. | true | false | Yes |
OnError | Determines the action the tool performs when an error occurs during the installation. | Stop | Continue | Yes |
LogFile | File where the log is saved. The default value is <installation path>\setup.log. | full path to a file | Yes |
CheckRequirements | Indicates if the tool checks whether the minimum required.NET Framework version is installed on the target machine before executing the installation. The installation if aborted if the required .NET version is not detected. | true | false | No |
Setup
The first sub-element under SilentInstall is Setup. This element allows you to configure the general options by means of attributes:
Attribute | Description | Accepted values | Required? |
NET | Sets the Target framework version of the installed Xperience web project. | 4.8 | Yes |
SetupFolder | Folder where the tool installs the Xperience setup files (not the web project). | full path to a folder | Yes |
DevelopmentModel | Sets the development model of the installed web project. Installations create a separate web project for the live site, in addition to the administration interface project. | MVC | AspNetCore | Yes |
RegisterToIIS | Determines if the tool registers the new web projects as applications in the local Internet Information Services server. | true | false | Yes |
ModifyInstallation | If true, the installation does not create a new project, but only modifies an existing one on a local machine (adds or removes components). | true | false | No |
OpenAfterInstall | Determines if the tool opens the newly installed websites in a new browser window when the installation finishes. | true | false | No |
InstallWinServices | Determines if the tool installs Kentico Windows services in Windows. | true | false | No |
RegisterApplicationToEventLog | Determines if the tool registers the Xperience application in the Windows Event Log. | true | false | No |
DeleteExisting | Determines if the tool deletes the existing setup files in a folder with the same name as set in the SetupFolder attribute. | true | false | No |
InstallOnlyProgramFiles | Determines if only the program files are installed. This option ignores all other settings. | true | false | No |
DoNotOverwriteInstallation | If set to false, the installation overwrites any existing web project files in the target location are overwritten (set by the TargetFolder attribute of the IIS element). The default value is true (do not overwrite). | true | false | No |
EnableModuleUsageTracking | Determines whether the installed instance has the Kentico improvement program enabled (sending of data about the system’s usage to Kentico). You can stop the sending of data at any time for installed instances in the administration interface through the Settings -> System -> Send anonymous usage records to Kentico setting. | true | false | No |
IIS
The IIS sub-element is also located directly under SilentInstall. Its attributes allow you to adjust IIS-related settings of the installation:
Attribute | Description | Accepted values | Required? |
Website | The name of the web site in IIS (used if the RegisterToIIS attribute of the Setup element is set to true). The web site must exist in IIS before running the installation. | string value | Yes |
TargetFolder | Path to the folder where the web project is created and mapped in IIS. For example: C:\inetpub\wwwroot\Kentico_{%productversion%} | full path to a folder | Yes |
DeleteExisting | Determines if the tool deletes an existing IIS web site and project folder before the installation (as specified by the Website and TargetFolder attributes). If you set the GetUnique value, the tool does not delete existing sites, but instead creates a new folder and web site with a similar name. | true | false | GetUnique | No |
KillRunningProcesses | If the tool deletes existing sites, this parameter indicates whether the tool also kills already running processes related to these files. | true | false | No |
Sql
The Sql sub-element of the SilentInstall element allows you to configure database-related settings of the installation. This element is not required and if you do not include it in your XML file, the database will not be installed.
Note: The letter case in the element name must be exact (lower case “q” and “l”).
Attribute | Description | Accepted values | Required? |
InstallDatabase | Indicates if the tool installs the database. If you do not install the database, you will not be able to install sample sites (WebSites element). | true | false | No |
Server | Name of the target SQL server. | string value | No |
Database | Name of the target database. | string value | No |
Authentication | Type of the authentication used to access the SQL server. | SQL | Windows | No |
SqlName | User name of the account used for access to the SQL server. | string value | No |
SqlPswd | Password for the SQL server account. | string value | No |
Operation | Determines whether the tool creates a new database or modifies an existing one. The default value is New. | New | Modify | No |
DeleteExisting | Indicates if the tool deletes an existing database with the same name as set in the Database attribute. If you set the GetUnique value, the tool does not delete existing database, but instead creates a new database with a similar name. | true | false | GetUnique | No |
Schema | The default database schema is dbo. If you have a different schema on your SQL server (e.g., db_owner), specify it here, so that the installation tool can make adjustments to the database. | string value | No |
Collation | Sets the collation used by the installed database. We recommend leaving the default collation – Latin1_General_CI_AS. | string value | No |
Notification
The Notification sub-element allows you to configure automatic notification email messages. The system sends them to the specified email address when an error occurs during the installation.
Attribute | Description | Accepted values | Required? |
Enabled | Indicates, if the tool sends notification emails when an error occurs during the installation. | true | false | Yes |
From | Email address of the sender of the notification email. This value is required in the Notification element. | email address | Yes |
To | Email address of the recipient of the notification email. This value is required in the Notification element. | email address (or multiple addresses separated by a semicolon (;)) | Yes |
Server | Name of the SMTP server used to send out the notification email. | string value | Yes |
Subject | Subject of the notification email message. | string value | Yes |
UserName | User name of the SMTP server account used to send out the notification email. | string value | No |
Password | Password for the SMTP server account used to send out the notification email. | string value | No |
SSL | Indicates, if SSL is used when sending the notification email. | true | false | No |
AttachLogFile | Indicates, if the tool includes a compressed installation log file as an attachment. | true | false | No |
UICultures and Dictionaries
The UICultures and Dictionaries elements allow you to configure which UI culture and dictionaries will be installed by the tool. If you chose to modify an existing Xperience installation (by specifying the Modify value for the Location attribute), you can also use these elements to add new components to the existing installation or to remove unwanted components.
Each of these elements only has a single attribute:
Attribute | Description | Accepted values | Required? |
type |
| Mix | InstallAll | RemoveAll | Yes |
Each of the UICultures and Dictionaries elements can have any number of sub-elements named UICulture or Dictionary. These sub-elements represent particular UI cultures or dictionaries and have the following attributes:
Attribute | Description | Accepted values | Required? |
name | Name of the UI culture or dictionary. | string value | Yes |
operation | The operation that should be performed with the component:
| Add | Remove | No | Yes |
WebSites
The WebSites element lets you configure which websites will be installed. It has no attributes itself – it only contains WebSite sub-elements representing individual websites to be installed. Each WebSite sub-element has the following attributes:
Attribute | Description | Accepted values | Required? |
domain | The administration domain used by the site in Xperience. | string value | Yes |
displayname | The display name of the site in Xperience. | string value | Yes |
webtemplatename | Code name of the web template used for the site. | available web template code name | Yes |
projectdirectoryname | Sets the name for the following:
Note: The project directory name must be unique (it is not validated for conflicts with existing folders). | string value | No |
runsite | Indicates if the tool runs the site after it is imported to the system. | true | false | No |
rebuildsearchindexes | Indicates if any search indexes included in the site’s template are rebuilt after the installation. | true | false | No |
Licenses
You can add any number of License sub-elements under the Licenses element. These sub-elements represent particular licenses for separate domains. State the domain in the domain attribute of the WebSite element and add the actual key as a sub-element wrapped in a CDATA enclosure.
Example
Here you can find an example of the configuration file. The file configures installation of Xperience with the sample Dancing Goat MVC website and all the available UI cultures and dictionaries.
<SilentInstall ShowProgress="CommandPrompt" Log="True" OnError="Stop" LogFile="{%programfiles%}\Kentico\13.0\setup.log" CheckRequirements="False" >
<Setup NET="4.8" SetupFolder="{%programfiles%}\Kentico\13.0" InstallOnlyProgramFiles="False" OpenAfterInstall="True" DeleteExisting="False" DoNotOverwriteInstallation="True" InstallWinServices="False" RegisterApplicationToEventLog="False" EnableModuleUsageTracking="True" />
<IIS Website="Default Web Site" TargetFolder="C:\inetpub\wwwroot\Kentico13_{%fileversion%}" DeleteExisting="GetUnique" KillRunningProcesses="False" />
<Sql InstallDatabase="True" Server="SERVER_NAME" Authentication="SQL" SqlName="LOGIN" SqlPswd="PASSWORD" Database="Kentico13_{%fileversion%}" Operation="New" DeleteExisting="False" />
<UICultures type="InstallAll" />
<Dictionaries type="InstallAll" />
<WebSites>
<WebSite domain="localhost" displayname="Dancing Goat MVC" webtemplatename="DancingGoatMVC" />
</WebSites>
<Licenses>
<License domain="localhost">
<![CDATA[
DOMAIN:localhost
PRODUCT:CX13
EXPIRATION:00000000
PACKAGES:
SERVERS:1
ODWrIUyRdEv3Ko+7kLCN2WD4jEsOl3l0+au1AJ3zU0Jw5b3Q1h1eBlWh1fNAWAe2NbSb6gm1qUhJHdUTI4rBPANDgmYvEBFZRqpYbDYVCYsXEeQy4H2ipwXfASGFMI5UuKvHRTJ5KBo9OE4k4ZJmPVratLjOcSvFVERhGubZl7MZghwCBSHQNNvN3RWN3mwi1+vgou+N/Z1XDWXtfprzDEwFFJHyl/4NOoKbNzvGhuV1Jmq1XbGiT8Od0Y2vufeqzcM4VdFRRAOlIoQHFwwfyEah2kSw1z9zUbqWj3nZqZUD6jXi8FokOWKWzZeybg9NQgZ1+vtd7jg1B1+bz/Te+w==
]]>
</License>
</Licenses>
</SilentInstall>