Config.xml reference (SharePoint Foundation 2010)
Applies to: SharePoint Foundation 2010
When you want to control how Microsoft SharePoint Foundation 2010 is installed, use the Config.xml file and the Setup command-line tool. For example, you can use the Config.xml file to do the following:
Perform a silent installation of SharePoint Foundation 2010.
Install SharePoint Foundation 2010 by using a common configuration across multiple servers.
Perform an automated or scripted installation of SharePoint Foundation 2010.
In this article:
Customizing Config.xml
Config.xml element quick reference
How it works
Config.xml file format
Config.xml element reference
Customizing Config.xml
To control the installation, first edit the Config.xml file in a text editor to include the elements that you need with the appropriate settings for those elements. Then run setup.exe /config [path and file name]
to specify that Setup will run and use the options that you set in the Config.xml file.
Important
Use a text editor, such as Notepad, to edit Config.xml. Do not use a general-purpose XML editor such as Microsoft Office Word 2007.
The product DVD contains examples of Config.xml files. The example files are stored in the Files folder at the root of the DVD, in folders that correspond to different scenarios. The folders are as follows:
Setup Contains a Config.xml file for use in setting up a clean installation. You must run the Psconfig command-line tool after you run Setup to finish configuring the server or server farm.
SetupFarmSilent Contains a Config.xml file for use in setting up a server farm in silent mode.
SetupSilent Contains a Config.xml file for use in setting up a clean installation for a single server (stand-alone, with Windows Internal Database) in silent mode.
SetupUpgradeSilent Contains a Config.xml file for use in upgrading an existing server farm in place.
For more information about the differences among the various upgrade scenarios, see Determine upgrade approach (SharePoint Foundation 2010).
Config.xml element quick reference
The following table contains a list of the elements in Config.xml. These elements can appear in any order, except for Configuration, which must be first, and elements such as Command, whose order in Config.xml affects how they are processed during installation.
Element |
Description |
Configuration |
Top-level element. |
ARP |
Values that control the text and behavior of Add or Remove Programs in Control Panel for the product. |
Command |
Runs a command during installation. |
Display |
The level of UI that Setup displays to the user. |
Logging |
Options for the type of logging that Setup performs. |
DATADIR |
The location to use to store the data files. |
Package |
The package or product to install. |
Setting |
Values for Windows Installer properties. |
How it works
Setup looks for a copy of Config.xml in the same folder as Setup.exe. If a copy is not found there, Setup uses the Config.xml file that resides in the core Files folder for the product that you are installing.
You can also use the /config Setup command-line option to specify the location of the Config.xml file. For example:
\\<server>\<share>\setup.exe /config \\<server>\<share>\<folder>\config.xml
Config.xml file format
XML elements in Config.xml begin with an angle bracket (<) and end with a forward slash and an angle bracket (/>).
The basic element format is as follows:
<element_name [attribute_name="value"] [attribute_name="value"] … />
For example:
<Display Level="none" CompletionNotice="no" />
Elements and attributes are case-sensitive. Attribute values must be enclosed in quotation marks (") and are not case-sensitive.
An element definition can span multiple lines. Spaces, carriage returns, line feeds, and tab characters are ignored within an element definition.
For example:
<Display
Level="none"
CompletionNotice="no"
/>
Tip
For long element definitions, put attributes on separate lines and use indentation to make the file easier to read.
The Configuration element is a special case and is required. All other elements are contained within the Configuration element, and the element is closed with </Configuration>.
The following example shows a configuration file for a clean installation of the Microsoft SharePoint Foundation 2010 package:
<Configuration>
<Package Id="sts">
<Setting Id="SETUPTYPE" Value="CLEAN_INSTALL"/>
</Package>
<DATADIR Value="%CommonProgramFiles%\Microsoft Shared\Web Server Extensions\14\Data"/>
<Logging Type="verbose" Path="%temp%" Template="Microsoft SharePoint Foundation 2010 Setup *.log"/>
<Setting Id="UsingUIInstallMode" Value="1"/>
<Setting Id="SETUP_REBOOT" Value="Never"/>
</Configuration>
Comments can be added anywhere and are delimited by an angle bracket, exclamation point, and two hyphens (<!--) and two hyphens and an angle bracket (-->).
For example:
<!-- Install Microsoft SharePoint Server for clean install, using UI-->
<Configuration>
<Package Id="sts">
<Setting Id="LAUNCHEDFROMSETUPSTS" Value="Yes"/>
</Package>
<Package Id="spswfe">
<Setting Id="SETUPCALLED" Value="1"/>
</Package>
<Logging Type="verbose" Path="%temp%" Template="SharePoint Server Setup(*).log"/>
<!--<PIDKEY Value="Enter Product Key Here" />-->
<Setting Id="SERVERROLE" Value="SINGLESERVER"/>
<Setting Id="USINGUIINSTALLMODE" Value="1"/>
<Setting Id="SETUPTYPE" Value="CLEAN_INSTALL"/>
<Setting Id="SETUP_REBOOT" Value="Never"/>
<!-- Tells Setup.exe not to reboot -->
</Configuration>
Config.xml element reference
The following conventions are used in the descriptions in this reference:
bold |
Element or attribute name |
regular |
Text to be entered exactly as shown |
italic |
Placeholder for a value to be added |
x|y |
Choose between multiple values |
[x] |
Optional value |
Configuration Element
Top-level element. This element is required, and all other elements must appear within this element.
Syntax
<Configuration>
<Package Id="ID">
...
</Package>
...
</Configuration>
Attributes
Attribute |
Value |
Description |
Package ID |
Package ID |
The package that is being installed. |
Remarks
The Package Id attribute identifies the product and technologies that are affected by this Config.xml file.
Example
The Package ID for SharePoint Foundation 2010 is sts. Use the sts Package ID in Config.xml to specify SharePoint Foundation 2010 by entering the following:
<Configuration>
<Package Id="sts">
...
</Package>
...
</Configuration>
ARP Element
Specifies values that control the text and behavior of Add or Remove Programs in Control Panel for the product.
Syntax
<ARP attribute =" value " [attribute**="value"**] ... />
Attributes
Attribute |
Value |
Description |
ARPCOMMENTS |
text |
Additional text; can be up to 255 characters, although all characters might not display. |
ARPCONTACT |
text |
List of technical support contacts. |
ARPNOMODIFY |
Yes |
Prevents users from modifying the product installation by making the Change button unavailable. |
No (default) |
Allows users to modify the product installation. |
|
ARPNOREMOVE |
Yes |
Prevents users from removing the product by making the Remove button unavailable. |
No (default) |
Allows users to remove the product. |
|
ARPURLINFOABOUT |
URL |
URL for the product's home page. |
ARPURLUPDATEINFO |
URL |
URL for information about product updates. |
ARPHELPLINK |
URL |
URL of a Web site from which users can receive technical support. |
ARPHELPTELEPHONE |
text |
Phone numbers for technical support. |
Command Element
Specifies a command line to run. The Command element commands are processed only during initial installations and uninstallations. If Command element commands are used for customizations after the initial installation, they are ignored.
Syntax
<Command
Path="path"
[QuietArg="arguments"]
[Args="args"]
[ChainPosition="Before" | "After"(default)]
[Wait="mseconds"]
[Execute="Install"(default) | "Uninstall"]
[Platform="x86"(default) | "x64"]
/>
Attributes
You can specify double-quotation marks (") in the Path and Args attributes by specifying two double-quotation marks together ("").
Attribute |
Value |
Description |
Path |
path |
Fully qualified path of the executable Windows Installer package. |
QuietArg |
string |
String of arguments to be appended to the command line when Display Level=None. |
Args |
string |
String of arguments to be passed to the executable. |
ChainPosition |
Before |
This command is executed before the primary product installation. |
After (default) |
This command is executed after the primary product installation. |
|
Wait |
mseconds |
When you install with the Display Level attribute set to Full or Basic, this is the number of milliseconds to wait after you run the program before you continue the installation. The default is 0 (zero), which indicates no waiting. |
Execute |
Install (default) |
Setup executes this command when the primary product is installed. |
Uninstall |
Setup executes this command when the primary product is uninstalled. |
|
Platform |
x86 (default) |
Specifies that this program requires the Intel x86 platform. This command runs only if the computer on which the installation is run matches this platform requirement. |
x64 |
Specifies that this program requires a 64-bit processor that supports the x64 extensions to the x86 architecture. This command runs only if the computer on which the installation is run matches this platform requirement. |
Remarks
The Command element in the Config.xml file is intended to be used only for initial product installations and uninstallations. The Command element commands are processed only during initial installations and uninstallations. If Command element commands are used for customizations after the initial installation, they are ignored.
The command line can be specified to run an arbitrary command or to run a lightweight executable that you want to run when this product is installed.
The Command element in Config.xml does not provide the software deployment capabilities that an enterprise software deployment and management tool provides, such as the ability to track deployment progress and troubleshoot problems. Therefore, we recommend that you limit the use of the Command element in Config.xml to run only a lightweight executable program or arbitrary command that will not make changes to the computer or that does not require user input. For example, you can run a utility to copy logs or a command to launch a Welcome page at the end of installation.
The command line can be specified for a chained installation or an executable that runs when this product is installed. If this is specified, you must specify a command line for Setup instead of a single .msi file.
If there are two or more Command elements in the Config.xml file, they will run in the order in which they are specified in Config.xml.
Important
Chaining is not as reliable as installing each product separately. For example, if you chain two installations together and one of the products fails or encounters an unexpected error, the primary installation and the chained installation might not be completed successfully. Therefore, we do not recommend that you use the chaining approach. The recommended method for installing multiple products together in enterprise environments is to use a deployment management program, such as Microsoft System Center Configuration Manager 2007 or Microsoft Systems Management Server (SMS) 2003, or a third-party tool, instead of chaining.
The use of Args and QuietArg is as follows:
The Args attribute is always appended to the command. This can include switches such as /install or **Company=**MyCorporation.
The QuietArg attribute is also appended if Setup is running silently (with Display set as
Display="none"
). In such cases, you can specify the QuietArg attribute with the "/quiet" switch. For example, you can use:QuietArg="/quiet"
.If the value of the Args element includes quotation marks, you can enclose the complete value in single (') quotation marks as shown in the following example:
Args='"/param value"'
The following statements apply to the Wait attribute:
Setting the Wait attribute to 0 milliseconds indicates no waiting after you run the program before you continue the installation. The command will execute and move on immediately.
Return codes are only respected if the Wait value is nonzero. If you specify 0, Setup will not wait to continue the installation after it runs the specified program. Therefore, there is no return code to report in that case.
Setting the Wait attribute to any positive nonzero value will wait exactly the number of milliseconds you specify. If the process ends earlier than the specified time, Setup will continue. If the process has not ended when the specified time is up, Setup will fail.
Setting the Wait attribute to -1 indicates to wait indefinitely. This can be problematic because if the command process stops responding (hangs), Setup will stop responding and will wait indefinitely for the command to run.
Example
<Command Path="\\server\share\myscript.exe" Args='/id "123 abc"' QuietArg="/q" Wait="3000">
<Command Path="\\<server>\<share>\setup.exe /config \\<server>\<share>\<folder>\config.xml"
DATADIR Element
The location to use to store the data files, including the search index files.
Syntax
<DATADIR Value=" path "/>
Attributes
Attribute |
Value |
Description |
Value |
path |
Setup stores the data files in the location that is specified. |
Remarks
You can use system environment variables in the path. If this element is not specified, the data is stored in the following path:
%ProgramFiles%\Microsoft SQL Server\MSSQL$SHAREPOINT\Data
Example
<DATADIR Value="d:\data"/>
Display Element
The level of UI that Setup displays to the user.
Syntax
<Display
Level="None" | "Basic" | "Full"(default)
CompletionNotice="Yes"(default) | "No"
SuppressModal="Yes" | "No"(default)
NoCancel="Yes" | "No"(default)
AcceptEula="Yes" | "No"(default)
/>
Attributes
Attribute |
Value |
Description |
Level |
None |
No Setup UI is displayed. |
Basic |
Setup displays the Welcome screen, the Microsoft Software License Terms page (if it is needed), a progress bar, and the completion notice (if it is allowed). |
|
Full (default) |
Setup displays all UI to the user. |
|
CompletionNotice |
Yes |
Only applies if Level is set to Basic or None. Setup displays the completion notice. |
No (default) |
Only applies if Level is set to Basic. Setup does not display the completion notice. |
|
SuppressModal |
Yes |
Only applies if Level is set to Basic. Setup does not display error messages and other dialog boxes that might interrupt the installation. |
No (default) |
Only applies if Level is set to Basic. Setup displays errors and other dialog boxes as needed. |
|
NoCancel |
Yes |
If Level is set to Full or Basic, disables the cancel button (X in the upper-right corner of the progress dialog box). |
No (default) |
If Level is set to Full or Basic, allows the user to cancel the installation from the progress bar. |
|
AcceptEULA |
Yes |
The Microsoft Software License Terms are accepted on behalf of the user. Setup does not display the Microsoft Software License Terms page. |
No (default) |
If Level is not set to None, Setup displays the Microsoft Software License Terms page. |
Remarks
If this element is not defined, the default settings are used. If an invalid value is specified, Setup ends the installation.
Note
The Display element is used by Setup only if Setup finds the Config.xml file in the same folder as Setup.exe, or if you specify the Config.xml file by using the Setup /config command-line option.
Example
<Display Level="basic"
CompletionNotice="yes"
SupressModal="no"
AcceptEula="yes"
/>
Logging Element
Specifies the type of logging that Setup performs.
Syntax
<Logging
Type="Off" | "Standard"(default) | "Verbose"
Path="path"
Template="filename.txt"
/>
Attributes
Attribute |
Value |
Description |
Type |
Off |
Setup does no logging. |
Standard (default) |
Setup writes installation information to the log file. |
|
Verbose |
Setup writes all installation information to the log file. |
|
Path |
Path |
The fully qualified path of the folder used for the log file. You can use environment variables. The default is %temp%. |
Template |
filename .txt |
The name of the log file. If you insert the string * anywhere in the file name, a unique log file is created for each installation that is performed by Setup (see the explanation that follows). If * is not included and the file name that is specified already exists, log information is appended to the existing file. The .txt file name extension must be included. The default template is SetupExe(*).log. |
Remarks
You can specify a * anywhere in the Template value. Setup inserts a string in that location that has the following format:
YYYYMMDDHHMMSSxxx
where:
YYYY = Year
MM = Month
DD = Day
HH = Hour
MM = Minutes
SS = Seconds
xxx = a unique string generated by Setup
Note
The Logging element is used by Setup only if you specify the Config.xml file by using the Setup /config command-line option. If you do not specify a Config.xml file to use, then Setup uses the default logging options.
Example
<Logging Type="standard" Path="%temp%"
Template="MyLog(*).txt"
/>
With this example, Setup creates a log file every time that it installs the product. Setup uses unique file names such as the following:
%temp%\MyLog(20060428110717CFC).txt
%temp%\MyLog(20060429113143C70).txt
Package Element
The package or product to install.
The Package ID for SharePoint Foundation 2010 is sts.
Setting Element
Allows you to specify values for Windows Installer properties.
Syntax
<Setting Id=" name " Value=" value " />
Attributes
Attribute |
Value |
Description |
Id |
name |
The name of the Windows Installer property. |
Value |
value |
The value to assign to the property. |
Values
The following Setting IDs are used for server installations:
ID |
Accepted values |
Description |
REBOOT |
ReallySuppress |
Specifies (for Windows Installer) whether to allow a reboot after Setup is completed. Use ReallySuppress to specify no reboot. Must be specified at the global level, not per package. |
SETUP_REBOOT |
Never, AutoAlways, Always, AutoIfNeeded, IfNeeded |
Specifies (for Setup) whether to allow a reboot after Setup is completed. Use Never to specify no reboot. Must be specified at the global level, not per package. |
SETUPTYPE |
CLEAN_INSTALL, V2V_INPLACE_UPGRADE |
Specifies whether to install a new copy of the product or technology (CLEAN_INSTALL), install the new version and upgrade the previous version in place (V2V_INPLACE_UPGRADE). Must be specified at the global level, not per package. |
SETUPCALLED |
0 | 1 |
Use as part of the Package Id attribute. |
SERVERROLE |
SINGLESERVER, APPLICATION |
Specifies the type of server that you are installing to: stand-alone (SINGLESERVER) or application (APPLICATION). |
USINGUIINSTALLMODE |
0 | 1 |
Specifies whether you are performing a silent installation (0) or using the user interface for Setup (1). |
Remarks
Not all Windows Installer properties can be specified in the Setting element. If a blocked property is specified, Setup ends the installation process. If a supported property is specified, Setup passes the property directly to Windows Installer.
Example
<Setting Id="REBOOT" Value="ReallySuppress" />