Install prerequisites from a network share (SharePoint Foundation 2010)
Published: May 12, 2010
This article describes how to install Microsoft SharePoint Foundation 2010 prerequisites from an offline shared network location using the prerequisite installer (PrerequisiteInstaller.exe) tool.
Installing prerequisites from an offline location is typically required when the servers on which you want to install Microsoft SharePoint Foundation are isolated from the Internet. Even if this is not the case, installing prerequisites from an offline central location enables you to ensure farm server consistency by installing a well-known and controlled set of images.
The Microsoft SharePoint Products Preparation Tool is a user interface built on PrerequisiteInstaller.exe. The Microsoft SharePoint Products Preparation Tool accepts no user input.
In this article:
Installer switches and arguments
By using PrerequisiteInstaller.exe with switches and arguments, you have control over which versions of the required software are installed and the location from where they are installed.
PrequisiteInstaller.exe accepts single or multiple switch and argument pairs. A switch identifies the prerequisite and the argument specifies the action and the location of the prerequisite.
A switch and argument pair uses the following format:
/switch is a valid switch to identify a prerequisite. For example, /NETFX35SP1: is the switch for .NET Framework 3.5 Service Pack 1.
<path> is expressed as the path to a local file or the path to a file share, for example, "C:\foldername\dotnetfx35.exe " or "\\<servername>\<sharename>\dotnetfx35.exe".
Each switch and its argument are separated by a colon and a space. The argument is enclosed in quotes.
The switch and argument pairs can be passed to PrerequisiteInstaller.exe at the command prompt or read from an arguments text file.
Download and consolidate the prerequisites on a file share
The process for downloading and consolidating prerequisites consists of the steps described in the following procedures.
To identify prerequisites
Refer to the Hardware and software requirements (SharePoint Foundation 2010) article, which contains a list of all the required and optional software for SharePoint Foundation 2010. Additionally, this document provides the download location for each prerequisite that is available for download on the Internet.
From the command prompt, navigate to the root of the SharePoint Foundation 2010 installation media or folder location.
At the command prompt, type PrerequisiteInstaller.exe /?. This displays a list of the command-line options and switches and their corresponding arguments for installing a prerequisite from the command-line.
To copy the contents of the active About window to the Clipboard, press CTRL+C.
Verify that you have an accurate list of the required software. Compare the output from the prerequisite installer to the list of prerequisites in Step 1.
Download the prerequisites to a computer that has Internet access.
Next, use the following procedure to create a central location that you can use for installing SharePoint Foundation prerequisites on all the farm servers.
To consolidate prerequisites
Create a shared folder on a computer that can be accessed by the servers on which the prerequisites will be installed.
Copy the files that you downloaded from the Internet to the shared folder.
After you finish creating an accessible network location for the prerequisites, use the procedure in the following section to install SharePoint Foundation 2010 prerequisites on a server.
Install the prerequisites from the command line
You can install one or all of the prerequisites from the command line using the following procedure.
To install from the command line
From the Start menu, open the Command Prompt window using the Run as administrator option.
Navigate to the SharePoint Foundation source directory.
Type the prerequisite program switch and corresponding argument for the program that you want to install, and then press ENTER, for example:
PrerequisiteInstaller.exe /SQLNCli: "\\o14-sf-admin\SP_prereqs\sqlncli.msi"
To install more than one prerequisite, type in each switch and argument pair, taking care to separate each pair by a space, for example:
PrerequisiteInstaller.exe /SQLNCli: "\\o14-sf-admin\SP_prereqs\sqlncli.msi" /ChartControl: "\\o14-sf-admin\SP_prereqs\MSChart.exe" /W2K8SP2: "\\o14-sf-admin\SP_prereqs\Windows6.0-KB948465-X64.exe" /NETFX35SP1: "\\o14-sf-admin\SP_prereqs\dotnetfx35setup.exe"
Install the prerequisites using an arguments file
You can install the prerequisites from the file share using an arguments file that consists of switches and corresponding path statements to the programs that need to be installed.
When you run PrerequisiteInstaller.exe with an arguments file, the following happens:
PrerequisiteInstaller.exe reads the argument file to verify that each switch is valid and that the program identified in the path statement exists.
If you specify an argument, PrerequisiteInstaller.exe ignores the arguments file and only processes the command-line argument.
PrerequisiteInstaller.exe scans the local system to determine if any of the prerequisites are already installed.
PrerequisiteInstaller.exe installs the programs in the argument file and returns one of the following exit codes:
0 - Success
1 – Another instance of this application is already running
2 – Invalid command line parameter
1001 – A pending restart blocks installation
3010 – A restart is needed
If a prerequisite requires a restart, a 3010 code is generated and you are prompted to click Finish to restart the system. The behavior of the installer after a 3010 code is different depending on which of the following conditions exist on the computer:
If Windows Server 2008 Service Pack 2 (SP2) is already installed on the system, the 3010 code is generated and the remaining prerequisites are installed. After the last prerequisite is installed you are prompted to restart the system.
If Windows Server 2008 SP2 is installed on the system by PrerequisiteInstaller.exe, the installer generates the 3010 code, and the installation of the remaining prerequisites is skipped. You are prompted to restart the system.
After the system restarts, PrerequisiteInstaller.exe starts running again because the startup file that is created before the restart contains a /continue flag.
After a restart, PrerequisiteInstaller.exe ignores the arguments file and attempts to download and install the remaining prerequisites from the Internet. For more information, see Known issues.
Use the following procedure to create an arguments file.
To create an arguments file
Using a text editor, create a new text document named PrerequisiteInstaller.Arguments.txt. Save this file to the same location as PrerequisiteInstaller.exe. This file will contain the switches and arguments that are used when you run the Microsoft SharePoint Products Preparation Tool.
Using a text editor, edit PrerequisiteInstaller.Arguments.txt and provide file paths to the installation source for each prerequisite switch, using the following syntax:
Where /switch is a valid switch and <path> is a path to the installation source.
The following example shows a complete arguments file that uses a file share as a common installation point.
For readability, the switches and path statements in the preceding example are displayed on separate lines. When you actually create a PrerequisitesInstaller.Arguments.txt file do not use line breaks, but separate each switch and path statement by a space. For more information, see Known issues.
After you finish editing PrerequisiteInstaller.Arguments.txt, save your edits, and verify that this file is in the same directory as PrerequisiteInstaller.exe.
Use the following procedure to install the prerequisites.
To install the prerequisites using an arguments file
Run PrerequisiteInstaller.exe from the command prompt to install the prerequisites.
If you are prompted to click Finish to restart the system, do not do so. Click Cancel. For more information, see Known issues before proceeding to the next step.
Restart the system manually.
Run PrerequisiteInstaller.exe from the command prompt.
There are two known issues that affect the use of an arguments file:
Using line breaks in the arguments file
If you create an arguments file and use line breaks to put each switch and argument on a separate line, the prerequisite installer fails. The workaround is to enter all the switch and argument pairs on a single line.
After a computer restart, the arguments file is not used
After a restart, PrerequisiteInstaller.exe executes the startup command file, which contains a /continue flag. The /continue flag forces the installer to ignore the arguments file.
You must prevent a restart by deleting the startup task in this command file using one of the following options:
Run PrerequisiteInstaller.exe by double-clicking it. The program will display the first screen with the list of prerequisites.
Click Cancel. PrerequisiteInstaller.exe deletes the startup task.
From the Start menu, choose Run and then type regedit to open the registry.
Open the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders.
Check the value for "Common Startup". This shows the directory where the startup tasks are listed.
Close the registry editor without making any changes.
Navigate to the startup directory, which is usually <systemdir>\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup.
Delete the startup task by deleting "SharePointServerPreparationToolStartup_0FF1CE14-0000-0000-0000-000000000000.cmd".