Udostępnij za pośrednictwem


Automate Windows Setup

Applies To: Windows 8, Windows 8.1, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2

You can prevent some or all of the user interface (UI) pages from Windows® Setup from being displayed during installation. The default behavior of Windows Setup is to display the Setup UI if any of the required settings are incorrect or empty.

Use an answer file while installing Windows

You can automate Windows installation by using an answer file:

Use a USB flash drive

  1. Use a sample answer file or create your own with Windows System Image Manager (Windows SIM).

  2. Save the file as Autounattend.xml on the root of a USB flash drive.

  3. On a new PC, put in the Windows product DVD and the USB flash drive, and then boot the PC. When no other answer file is selected, Windows Setup searches for this file.

Select an answer file

  • You can select a specific answer file during installation by booting to the Windows Preinstallation Environment, and using the setup.exe command with the **/unattend:**filename option.

For sample answer files and a list of settings used to automate installation, see Automate Windows Setup.

Sample answer files

The following sample files are included in the Windows Assessment and Deployment Kit (Windows ADK) in the following folder:

C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Deployment Tools\Samples\Unattend.

List of settings

The following is a list of the settings used in these answer files:

  • Windows Setup language settings: Microsoft-Windows-International-Core-WinPE\UILanguage and Microsoft-Windows-International-Core-WinPE\SetupUILanguage\UILanguage.

  • Product key: Microsoft-Windows-Setup\UserData\ProductKey\Key.

Automating Windows Setup

To automate Windows Setup, add settings for each of the following Windows Setup pages to your unattended Setup answer file. When a setting for a Windows Setup page is configured, Windows Setup skips that page.

Language, Region, and Input Method Selection Page

Setting Description

Microsoft-Windows-International-Core-WinPE | UILanguage

Specifies the default language to use on the installed Windows operating system.

Microsoft-Windows-International-Core-WinPE | SetupUILanguage | UILanguage

Specifies the default language to use during Windows Setup. During installation, Windows Setup displays installation progress in the selected language.

Note

When you use an Autounattend.xml file with Windows Setup and rely on an implicit answer-file search, the language selection page in Setup is not displayed, even if you explicitly do not configure language settings in your answer file. For more information about implicit answer files, see Windows Setup Automation Overview.

Type your Product Key for Activation Page

The product key must match the Windows edition you intend to install. For more information, see Work with Product Keys and Activation.

Setting Description

Microsoft-Windows-Setup | UserData | ProductKey | Key

Specifies the product key used to install Windows.

Microsoft-Windows-Setup | ImageInstall | OSImage | InstallFrom | MetaData | (Key and Value).

Use Key and Value together to select a specific Windows image to install. Required for some Windows Server® 2012 editions.

You can get the image information by using the DISM /Get-ImageInfo command. For more information, see Image Management Command-Line Options.

Accept Microsoft Software License Terms Page

Setting Description

Microsoft-Windows-Setup | UserData | AcceptEula

Specifies whether to accept Microsoft License Software Terms during Windows Setup.

Select Upgrade or Custom Installation Page

By default, when an answer file is used, this page does not appear and Windows is configured as a new installation. To configure Windows as an upgrade, add the following setting:

Setting Description

Microsoft-Windows-Setup | UpgradeData | Upgrade

Specifies that the present installation is an upgrade from a previous version of Windows.

Specify Where to Install Windows Page

You can either specify the exact disk ID and partition ID, or you can install Windows to the first available partition. To preconfigure your partitions, you may also need to configure your drive partitions. For full XML examples and recommended partition configurations, see How to Configure UEFI/GPT-Based Hard Disk Partitions or How to Configure BIOS/MBR-Based Hard Disk Partitions.

Setting Description

Microsoft-Windows-Setup | ImageInstall | OSImage | InstallTo | DiskID

Specifies the disk where Windows will be installed.

Microsoft-Windows-Setup | ImageInstall | OSImage | InstallTo | PartitionID

Specifies the partition where Windows will be installed.

-or-

Setting Description

Microsoft-Windows-Setup | ImageInstall | OSImage | InstallToAvailablePartition

Specifies to install Windows on the first available partition.

Settings to Use with Unattended Windows Deployment Services

When deploying Windows using Windows Deployment Services, add each of the settings in the following sections to your unattended-Setup answer file. These are the only settings required for an unattended installation.

Select a Language and Locale Page

Setting Description

Microsoft-Windows-International-Core-WinPE | SetupUILanguage | UILanguage

Specifies the default language to use during Windows Setup.

Provide Windows Deployment Services Credentials Page

Setting Description

Microsoft-Windows-Setup | WindowsDeploymentServices | Login

Specifies the credentials used for Windows Deployment Services logon, and specifies in what circumstances the UI is displayed for logon.

Select an Image to Install Page

Setting Description

Microsoft-Windows-Setup | WindowsDeploymentServices | ImageSelection

Specifies the image to be installed and the location where it is installed, as well as whether the UI is displayed.

Specify Where to Install Windows Page

These settings assume that you are installing to a partitioned disk drive.

Setting Description

Microsoft-Windows-Setup | WindowsDeploymentServices | ImageSelection | InstallTo | DiskID

Specifies the disk ID of the disk to which the image is to be installed.

Microsoft-Windows-Setup | WindowsDeploymentServices | ImageSelection | InstallTo | PartitionID

Specifies the partition ID of the partition to which the image is to be installed.

See Also

Reference

Settings for Automating OOBE

Other Resources

Windows Setup Technical Reference