Config.xml reference (SharePoint Server 2010)

 

Aplica-se a: SharePoint Server 2010

Tópico modificado em: 2015-03-09

When you want to control how Microsoft SharePoint Server 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 Server 2010.

  • Install SharePoint Server 2010 by using a common configuration across multiple servers.

  • Perform an automated or scripted installation of SharePoint Server 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.

Importante

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 for a single server (stand-alone, with SQL Express).

  • SetupFarm   Contains a Config.xml file for use in setting up a clean installation for a server farm.

  • SetupFarmSilent   Contains a Config.xml file for use in setting up a server farm in silent mode.

  • SetupFarmUpgrade   Contains a Config.xml file for use in upgrading an existing server farm in place.

  • SetupSilent   Contains a Config.xml file for use in setting up a clean installation for a single server (stand-alone, with SQL Express) in silent mode.

  • SetupSingleUpgrade   Contains a Config.xml file for use in upgrading an existing single server (stand-alone) in place.

For more information about the differences among the various upgrade scenarios, see Determinar abordagem de atualização (SharePoint Server 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 Element, which must be first, and elements such as Command Element, whose order in Config.xml affects how they are processed during installation.

Element

Description

Configuration Element

Top-level element.

ARP Element

Values that control the text and behavior of Add or Remove Programs in Control Panel for the product.

Command Element

Runs a command during installation.

Display Element

The level of UI that Setup displays to the user.

INSTALLLOCATION Element

The fully qualified path of the folder on the user's computer in which the product is installed.

Logging Element

Options for the type of logging that Setup performs.

DATADIR Element

The location to use to store the data files.

Package Element

The package or product to install.

PIDKEY Element

The 25-character volume license key.

Setting Element

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"
/>

Dica

For long element definitions, put attributes on separate lines and use indentation to make the file easier to read.

The Configuration Element element is a special case and is required. All other elements are contained within the Configuration Element 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 Server 2010 is spswfe. Because SharePoint Server 2010 is based on the platform technology in SharePoint Foundation 2010, you must also install the sts (SharePoint Foundation 2010) package or the installation will not succeed.

Use the sts and spswfe Package IDs in Config.xml to specify SharePoint Foundation 2010 and SharePoint Server 2010 by entering the following:

<Configuration>
   <Package Id="sts">
   ...
   </Package>
   ...
   <Package Id="spswfe">
   ...
   </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 Element 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 Element 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.

Importante

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 Office Servers\14.0\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 Product Key (PIDKEY) page (if it is needed), 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.

If the Level attribute is set to Basic or None and you supply a product key by using the PIDKEY Element element, Setup assumes that you also accept the license terms on behalf of the user. In this case, regardless of how you set the AcceptEULA attribute, the user is not prompted for the license terms during installation.

Observação

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"
/>

INSTALLLOCATION Element

Specifies the fully qualified path of the folder on the user's computer in which the product is installed.

Syntax

<INSTALLLOCATION Value=" path " />

Attributes

Attribute

Value

Description

Value

path

The fully qualified path of the folder on the user's computer in which the product is installed.

Remarks

You can use system environment variables in the path. If this element is not specified, the product is installed in the following path:

%PROGRAMFILES%\Microsoft Office Servers\14.0\

Note that the SharePoint Foundation 2010 technology is not affected by this element; it is installed into the following path:

%COMMONPROGRAMFILES%\Common Files\Microsoft Shared\Web Server Extensions\14

Example

<INSTALLLOCATION Value="%ProgramFiles%\MyApps" />

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:

  1. YYYY = Year

  2. MM = Month

  3. DD = Day

  4. HH = Hour

  5. MM = Minutes

  6. SS = Seconds

  7. xxx = a unique string generated by Setup

Observação

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 Server 2010 is spswfe. Because SharePoint Server 2010 is based on the platform technology in SharePoint Foundation 2010, you must also install the sts (SharePoint Foundation 2010) package or the installation will not succeed.

PIDKEY Element

The 25-character volume license key.

Syntax

<PIDKEY Value=" 25-character-key " />

Attributes

Attribute

Value

Description

Value

25-character-key

The 25-character volume license key.

Remarks

When the PIDKEY value is set, users are not required to enter a product key when they run Setup.

Example

<PIDKEY Value="1234512345123451234512345" />

Observação

If the Level attribute of the Display Element element is set to Basic or None and you supply a product key by using the PIDKEY element, Setup assumes that you also accept the license terms on behalf of the user. In this case, regardless of how you set the AcceptEULA attribute of the Display Element element, the user is not prompted for the license terms during installation.

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

LAUNCHEDFROMSETUPSTS

Yes | No

Use as part of the Package Id attribute. The default is Yes.

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, SKU2SKU_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), or upgrade from one product to another (such as from SharePoint Foundation 2010 to SharePoint Server 2010. 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. For a complete list of Windows Installer properties, including an explanation of supported and blocked properties, see Propriedades da instalação no Office System 2007.

Example

<Setting Id="REBOOT" Value="ReallySuppress" />