Windows panther unattend xml

Answer files (unattend.xml)

Answer files (or Unattend files) can be used to modify Windows settings in your images during Setup. You can also create settings that trigger scripts in your images that run after the first user creates their account and picks their default language.

Windows Setup will automatically search for answer files in certain locations, or you can specify an unattend file to use by using the /unattend: option when running Windows Setup (setup.exe).

Windows settings overview

While you can set many Windows settings in audit mode, some settings can only be set by using an answer file or Windows Configuration Designer, such as adding manufacturer’s support information. A full list of answer file settings (also known as Unattend settings) is in the Unattended Windows Setup Reference.

Enterprises can control other settings by using Group Policy. For more info, see Group Policy.

Answer file settings

You can specify which configuration pass to add new settings:

1 windowsPE: These settings are used by the Windows Setup installation program. If you’re modifying existing images, you can usually ignore these settings.

4 specialize: Most settings should be added here. These settings are triggered both at the beginning of audit mode and at the beginning of OOBE. If you need to make multiple updates or test settings, generalize the device again and add another batch of settings in the Specialize Configuration pass.

6 auditUser: Runs as soon as you start audit mode.

This is a great time to run a system test script — we’ll add Microsoft-Windows-Deployment\RunAsynchronousCommand as our example. To learn more, see Add a Custom Script to Windows Setup.

7 oobeSystem: Use sparingly. Most of these settings run after the user completes OOBE. The exception is the Microsoft-Windows-Deployment\Reseal\Mode = Audit setting, which we’ll use to bypass OOBE and boot the PC into audit mode.

If your script relies on knowing which language the user selects during OOBE, you’d add it to the oobeSystem pass.

These settings could be lost if the user resets their PC with the built-in recovery tools. To see how to make sure these settings stay on the device during a reset, see Sample scripts: Keeping Windows settings through a recovery.

Create and modify an answer file

Step 1: Create a catalog file

Start Windows System Image Manager.

Click File > Select Windows Image.

In Select a Windows Image, browse to and select the image file (D:\install.wim). Next, select an edition of Windows, for example, WindowsВ 10 Pro, and click OK. Click Yes to create the catalog file. Windows SIM creates the file based on the image file, and saves it to the same folder as the image file. This process can take several minutes.

The catalog file appears in the Windows Image pane. WindowsВ SIM lists the configurable components and packages in that image.

Troubleshooting: If Windows SIM does not create the catalog file, try the following steps:

To create a catalog file for either 32-bit or ARM-based devices, use a 32-bit device.

Make sure the Windows base-image file (\Sources\Install.wim) is in a folder that has read-write privileges, such as a USB flash drive or on your hard drive.

Step 2: Create an answer file

Click File > New Answer File.

The new answer file appears in the Answer File pane.

NoteВ В If you open an existing answer file, you might be prompted to associate the answer file with the image. Click Yes.

Step 3: Add new answer file settings

In the Windows Image pane, expand Components, right-click amd64_Microsoft-Windows-Shell-Setup_(version), and then select Add Setting to Pass 4 specialize.

In the Answer File pane, select Components\4 specialize\amd64_Microsoft-Windows-Shell-Setup_neutral\OEMInformation.

In the OEMInformation Properties pane, in the Settings section, select:

  • Manufacturer= Fabrikam
  • Model= Notebook Model 1
  • Logo= C:\Fabrikam\Fabrikam.bmp

Create a 32-bit color with a maximum size of 120×120 pixels, save it as D:\AnswerFiles\Fabrikam.bmp file on your local PC, or use the sample from the USB-B key: D:\ConfigSet\$OEM$\$$\System32\OEM\Fabrikam.bmp .

We’ll copy the logo into the Windows image in a few steps.

Set the device to automatically boot to audit mode:

In the Windows Image pane, expand Components, right-click amd64_Microsoft-Windows-Deployment_(version), and then select Add Setting to Pass 7 oobeSystem.

In the Answer File pane, select Components\7 oobeSystem\amd64_Microsoft-Windows-Deployment_neutral\Reseal.

In the Reseal Properties pane, in the Settings section, select Mode= Audit .

Читайте также:  Windows essential security downloads

Prepare a script to run after Audit mode begins.

In the Windows Image pane, right-click amd64_ Microsoft-Windows-Deployment_(version) and then click Add Setting to Pass 6 auditUser.

In the Answer File pane, expand Components\6 auditUser\amd64_Microsoft-Windows-Deployment_neutral\RunAsynchronous. Right-click RunAsynchronousCommand Properties and click Insert New AsynchronousCommand.

In the AsynchronousCommand Properties pane, in the Settings section, add the following values:

Description = Sample command to run a system diagnostic check.

Order = 1 (Determines the order that commands are run, starting with 1.)

Add a registry key. In this example, we add keys for the OEM Windows Store program. Use the same process as adding a script, using CMD /c REG ADD .

For Windows 10 Customer Systems, you may use the OEM Store ID alone or in combination with a Store Content Modifier (SCM) to identify an OEM brand for the OEM Store. By adding a SCM, you can target Customer Systems at a more granular level. For example, you may choose to target commercial devices separately from consumer devices by inserting unique SCMs for consumer and commercial brands into those devices.

Add RunAsynchronousCommands for each registry key to add. (Right-click RunAsynchronousCommand Properties and click Insert New AsynchronousCommand).

See the Unattended Windows Setup Reference for a full list of configuration options.

Step 4: Save the answer file

Save the answer file, for example: D:\AnswerFiles\BootToAudit-x64.xml.

NoteВ В Windows SIM will not allow you to save the answer file into the mounted image folders. В Step 5: Create a script

Since we specified a script to run in Step 3, let’s create that script now.

Copy the following sample script into Notepad, and save it as D:\AnswerFiles\SampleCommand.cmd.

Add the answer file and script to the image

Step 6: Mount an image and add the answer file

Use DISM to mount a Windows image. To learn how to mount an image, see Mount and modify a Windows image using DISM

Copy the answer file into the image into the \Windows\Panther folder, and name it unattend.xml. The Panther folder is one of the folders where Windows searches for an answer file. Create the folder if it doesn’t exist. If there’s an existing answer file, replace it or use Windows System Image Manager to edit/combine settings if necessary.

Unmount the image, committing the changes. For example:

where C is the drive letter of the drive that contains the mounted image.

This process may take several minutes.

When you apply your image, Windows will process your unattend file and will configure your settings based on what you specified in the unattend.

Windows Setup Automation Overview

Use Setupconfig.ini to install Windows

What is a setupconfig file?

Setupconfig is a configuration file that is used to pass a set of flags or parameters to Windows setup.exe. Use this file as an alternative to passing parameters to Windows setup on a command line. This functionality is available in Windows 10, version 1511 and later.

IT pros can use the setupconfig file to add parameters to Windows Setup from Windows Update and Windows Server Update Services.

The different parameters that can be used with Windows 10 Setup.exe are described in this topic.

Setupconfig.ini files can contain single parameters, or parameters and value pairs. Do not include “/” characters, and with parameter and value pairs, include “=” between the two.

For example, you create a Setupconfig.ini with the following. Note that the header [SetupConfig] is required.

This is equivalent to the following command line:

How does Windows Setup use Setupconfig.ini?

Using media/ISO file

If you are running Windows setup from media or an ISO file, you must include the location to the setupconfig file on the command line (“/ConfigFile

”) when running setup.exe. For example:

If you include a parameter on the command line and the same parameter in the setupconfig file, the setupconfig file parameter and value has precedence.

Using Windows Update

If the update is delivered through Windows Update, Windows Setup searches in a default location for a setupconfig file. You can include the setupconfig file here:

Use an answer file while installing Windows

You can automate Windows installation by using an answer file:

Use a USB flash drive

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

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

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 more information, see WinPE: Create USB Bootable drive.

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

Modify an existing installation

Because reboots are required during Setup, a copy of the answer file is cached to the %WINDIR%\Panther directory of the Windows installation. You can modify this file to do any of the following:

Update system and control panel settings without booting the image.

Update an image by preparing the PC to boot to audit mode (see Microsoft-Windows-Deployment\Reseal\Mode).

Читайте также:  Google контакты приложение windows

Update the order in which drivers or packages are installed. (Packages with dependencies may require installation in a certain order.)

Replace the answer file in an offline image

Create a custom answer file in Windows System Image Manager (Windows SIM).

Open an elevated command prompt.

Mount the Windows image.

Modify or replace the file: \Windows\Panther\unattend.xml in the mounted image.

NoteВ В The answer file in the image may contain settings that have not yet been processed. If you want these settings to get processed, edit the existing file rather than replacing it.

Unmount the image.

Test the image by deploying it to a new PC, without specifying an answer file. When Windows Setup runs, it finds and uses this answer file.

Implicit Answer File Search Order

WindowsВ Setup searches for answer files at the beginning of each configuration pass, including the initial installation and after applying and booting an image. If an answer file is found, and it contains settings for the given configuration pass, it processes those settings.

WindowsВ Setup identifies and logs all available answer files, depending on the search order. The answer file that has the highest precedence is used. The answer file is validated and then cached to the computer. Valid answer files are cached to the $Windows.

BT\Sources\Panther directory during the windowsPE and offlineServicing configuration passes. After the Windows installation is extracted to the hard disk, the answer file is cached to %WINDIR%\panther.

The following table shows the implicit answer file search order.

Specifies a pointer in the registry to an answer file. The answer file is not required to be named Unattend.xml.

The name of the answer file must be either Unattend.xml or Autounattend.xml.

Windows Setup searches this directory only on downlevel installations. If Windows Setup starts from Windows PE, the %WINDIR%\Panther\Unattend directory is not searched.

Windows Setup caches answer files to this location for use in subsequent stages of installation. For example, when a computer reboots, Setup can continue to apply the settings in an answer file. If you explicitly specify an answer file by using Windows Setup or Sysprep, the answer file cached to this directory is overwritten with the explicitly specified answer file.

Do not use, modify, or overwrite the answer file in this directory. The answer file in this directory is annotated by Windows Setup during installation. This answer file cannot be reused in Windows SIM or any other Windows installations.

Removable read/write media in order of drive letter, at the root of the drive.

Removable read/write media in order of drive letter, at the root of the drive.

The name of the answer file must be Autounattend.xml, and the answer file must be located at the root of the drive.

Removable read-only media in order of drive letter, at the root of the drive.

Removable read-only media in order of drive letter, at the root of the drive.

The name of the answer file must be Autounattend.xml, and must be located at the root of the drive.

\Sources directory in a Windows distribution

All other passes:

In the windowsPE and offlineServicing configuration passes, the name of the answer file must be Autounattend.xml.

For all other configuration passes, the file name must be Unattend.xml.

The answer file name must be Unattend.xml or Autounattend.xml

Drive from where Windows Setup (setup.exe) is running, at the root of the drive.

The name of the answer file must be Unattend.xml or Autounattend.xml, and must be located at the root of the Windows Setup folder path.

Sensitive Data in Answer Files

Setup removes sensitive data in the cached answer file at the end of each configuration pass.

Important
Because answer files are cached to the computer during Windows Setup, your answer files will persist on the computer between reboots. Before you deliver the computer to a customer, you must delete the cached answer file in the %WINDIR%\panther directory. There might be potential security issues if you include domain passwords, product keys, or other sensitive data in your answer file. However, if you have unprocessed settings in the oobeSystem configuration pass that you intend to run when an end user starts the computer, consider deleting the sections of the answer file that have already been processed. One option when you run the sysprep /oobe command might be to use a separate answer file that only contains settings in the oobeSystem configuration pass.

However, if an answer file is embedded in a higher precedence location than the cached answer file, then the cached answer may be overwritten at the beginning of each subsequent configuration pass, if the embedded answer file matches the implicit search criteria. For example, if an answer file is embedded at %WINDIR%\Panther\Unattend\Unattend.xml, the embedded answer file will replace the cached answer file at the beginning of each configuration pass. For example, if the embedded answer file specifies both the specialize and oobeSystem configuration passes, then the embedded answer file is discovered for the specialize configuration pass, cached, processed, and sensitive data is cleared. The embedded answer file is discovered again during the oobeSystem configuration pass and cached again. As a result, the sensitive data for the specialize configuration pass is no longer cleared. Sensitive data for previously processed configuration passes will not be cleared again. Unless the cached answer file must be overridden, embed the answer files at a location that has a lower precedence.

Important
Because answer files are cached to the computer during Windows Setup, your answer files will persist on the computer between reboots. Before you deliver the computer to a customer, you must delete the cached answer file in the %WINDIR%\panther directory. There might be potential security issues if you include domain passwords, product keys, or other sensitive data in your answer file. However, if you have unprocessed settings in the oobeSystem configuration pass that you intend to run when an end user starts the computer, consider deleting the sections of the answer file that have already been processed. One option when you run the sysprep /oobe command might be to use a separate answer file that only contains settings in the oobeSystem configuration pass.

You can add a command to the Setupcomplete.cmd command script that deletes any cached or embedded answer files on the computer. For more information, see Add a Custom Script to Windows Setup.

Windows Setup Annotates Configuration Passes in an Answer File

After a configuration pass is processed, Windows Setup annotates the cached answer file to indicate that the pass has been processed. If the configuration pass is run again and the cached answer file has not been replaced or updated in the interim, the answer file settings are not processed again. Instead, Windows Setup will search for implicit Unattend.xml files that are at a lower precedence location than the cached Unattend.xml file.

For example, you can install Windows with an answer file that contains Microsoft-Windows-Deployment/RunSynchronous commands in the specialize configuration pass. During installation, the specialize configuration pass runs and the RunSynchronous commands execute. After installation, run the sysprep command with the /generalize option. If there is no answer file in a higher precedence than the cached answer file or an answer file was not explicitly passed to the Sysprep tool, Setup runs the specialize configuration pass the next time that the computer boots. Because the cached answer file contains an annotation that the settings for that configuration pass were already applied, the RunSynchronous commands do not execute.

Implicit Answer File Search Examples

The following examples help describe the behavior of implicit answer file searches.

Answer Files Named Autounattend.xml are Automatically Discovered by Windows Setup

Create an answer file that is named Autounattend.xml that includes settings in the windowsPE configuration pass.

Copy Autounattend.xml to a removable media device.

Configure the BIOS of your computer to boot from CD or DVD.

Boot the Windows product DVD.

Insert the removable media device when Windows is booting. This example assumes that the removable media is assigned the drive letter D:\.

Windows Setup starts and automatically identifies Autounattend.xml as a valid answer file. Because the answer file uses a valid file name (Autounattend.xml), is located in one of the valid search paths (the root of D), and includes valid settings for the current configuration pass (windowsPE), this answer file is used.

The answer file is cached to the computer. If there are no additional answer files discovered in later passes, the cached answer file is used throughout Windows Setup.

Answer Files are Discovered in Order of Precedence in Predefined Search Paths

Install Windows with an answer file by using the steps in the previous scenario. The answer file that is used to install Windows is cached to the system in the %WINDIR%\Panther directory.

Copy an Unattend.xml file to the %WINDIR%\System32\Sysprep directory.

This answer file has settings in the generalize configuration pass.

Run the sysprep command with the /generalize option to create a reference image.

Because the %WINDIR%\System32\Sysprep directory is in the implicit search paths, the answer file copied to this directory is found. However, an answer file that was used to install Windows is still cached on the computer and contains settings for the generalize configuration pass. This cached answer file has a higher precedence than the one copied to the Sysprep directory. The cached answer file is used.

Note
The Sysprep tool can be run as a command-line tool or as a GUI tool. If you run the Sysprep tool as a GUI tool, you can select the Generalize check box.

Answer Files Must Include a Valid Configuration Pass

Copy an Unattend.xml file to a removable media device.

The Unattend.xml file has settings only for the auditSystem and auditUser configuration passes.

On an installed Windows operating system, run the sysprep /generalize /oobe command.

Even though the answer file is available in one of the implicit search paths, the Unattend.xml file is ignored because it does not contain a valid pass for the generalize configuration pass.

Additional Resources

See the following topics for more information about answer files and configuration passes:

Читайте также:  Чипсеты для mac os
Оцените статью
Search Order Location Description