In this article

System builder deployment of Windows 10 for desktop editions

In this article

This guide demonstrates how to create customized Windows 10 images that system builders can use to deploy to a line of devices, complete with customizations like apps, drivers, languages, and settings. We show how to make customizations both online and offline. We cover 64-bit and 32-bit Windows 10 for desktop editions (Home, Pro, Enterprise, and Education).

Prepare your lab environment

For your work PC (technician PC): If you plan to deploy only x64 devices, you can use either a Windows 10 x86 or x64 PC. However, if you plan to deploy x86 devices, you'll need an x86 PC for some steps.

Before starting the deployment procedure, you need to download the kits that will be used throughout the guide. Go to the Device Partner Center > Downloads and Installation > Understanding ADKs and OPKs. For a list of resources and kits that will be used and where to obtain them, see What you will need and where to get it.

For this guide, we use two USB drives. USB-A will be used to boot the system in Windows Preinstallation Environment (WinPE). USB-B will be used to move files between computers, store deployment and recovery scripts, and store and apply created images. (You can also format a single USB drive to store both WinPE and your images).

USB Hard Drive Name

Format

Minimum Size

USB-A

FAT32

~4GB

USB-B

NTFS

~16GB x86

~32GB amd64

Creating my USB-B

Format your USB drive and name it as follows:

Then download USB-B.zip from the Microsoft Download Center. Save the .zip file to USB-B and extract the contents there. The contents of the configuration files included in USB-B are examples that you may change according to your branding and manufacturing choices. However, file names and hierarchy of the folders and files must be the same as demonstrated below in order to align your deployment procedure with this guide.

Customizations throughout the document

Pass

Setting

Action

WinPE

Setup UI Language

EN-US

User Data

Preinstallation Product Key for ODR - Defined

Specialize

Internet Explorer Home Page

in the answer file

OEM Name

Defined in the answer file

OEM Logo

Defined in the answer file

Model

Defined in the answer file

Support Info

Defined in the answer file

OOBE System

Reseal

Audit/OOBE

StartTiles

Square Tiles / SquareOrDesktopTiles set to pin only desktop apps

TaskbarLinks (up to 6 pinned .lnk files)

Paint and Control Panel shortcuts have been set

Themes

Custom Theme with the OEM logo as the desktop background has been set

Visual Effects

SystemDefaultBackground set

Additional customizations

Product deployment

Office Single Image v16.5 OPK preloaded

Image customization

Adding language interface packs to Windows

Adding drivers and update packages

Adding OEM-specific logo and background files to Windows

Image size optimization

Pinning desktop applications to start sceen

Create a USB drive that can boot to WinPE

You must use the matching version of Windows ADK for the images being customized. For example, if you're building an image for Windows 10, version 1809, use the Windows ADK for Windows 10, version 1809.
For more details about the Windows ADK, see the Windows 10 ADK Documentation Homepage.

Copy the sources\Install.wim file from the directory in the Windows 10 media that you will be deploying to your local Desktop (~3gb).

Run Windows System Image Manager to start creating an answer file from scratch. This tool allows you to create or manage your answer files in an easy and organized manner.

Navigate to File > Select Windows Image. Browse to your local desktop and select Install.wim. A catalog file (.clg) will be created for the specified wim.

Troubleshoot: Catalog creation may fail due to several reasons. Please make sure install.wim has read/write permissions. If you continue getting error, make sure correct architecture (x86 or x64) Windows 10 is installed on technician PC. If you are creating catalog for x64 Windows 10 image, you are required to use x64 Windows 10 installed on x64 Windows 10 computer. Install.wim image and Windows 10 ADK versions must be the same.

Open a sample answer file or create a new one. USB-B\AnswerFiles\Unattend.xml is the sample answer file included on USB-B.

Click OK to associate the answer file with the Windows Image.

To add a driver to Windows PE, click Insert select Driver Path and select pass 1 windowsPE and then browse to the driver. Note: This step is optional and only required if a third-party driver is needed for use in the Windows Preinstallation Environment.

To add a package, click Insert, select Package, and then browse to the package you want to add. This step is optional.

Customize the answer file

Troubleshoot: A blank character in specialize | Microsoft-Windows-Shell-Setup | Computer Name will result in Windows installation failure.

See USB-B\AnswerFiles\Unattend.xml for an example of an answer file that has basic customizations. -

You may use the sample answer file and modify relevant parts or start from scratch by specifying some basic customizations.

Please see and use the Windows 10 default product key from Device Partner Center listed under Default product keys tab.

Add a product key that matches the Windows edition. This key isn't used to activate Windows, so you can reuse the same key for multiple installations:

In the Answer File pane, select Components\1 windowsPE\amd64_Microsoft-Windows-Setup_neutral\UserData\ProductKey. In the ProductKey Properties pane, under Settings, enter the value next to Key.

Important: These product keys cannot be used for activation. You will need to type a software product key during the installation process for activation. These keys will be removed when sysprep generalize is run. The end user will be required to type the unique product key from the Certificate of Authenticity (COA) label when first booting Windows 10.

In the IE-InternetExplorer Properties pane, in the Settings section, select Home_page, and add the URL of your website.

OEMs can specify Disk Configuration which is used to create/modify disk partitions and set image installation partition. This step is optional and configuration is included in the sample answer file USB-B\AnswerFiles\Unattend.xml.

Save the answer file to USB-B\AnswerFiles\Unattend.xml and close Windows SIM.

Update images for each model: offline servicing

Before mounting and editing the image, make a copy. Use a filename that describes the changes you want to make for this model-specific image you're making, for example:

Troubleshoot: If mounting operation fails, make sure that you are using the Windows 10 version of DISM that is installed with the Windows ADK and not an older version from your technician computer. Don’t mount images to protected folders, such as your User\Documents folder. If DISM processes are interrupted, consider temporarily disconnecting from the network and disabling virus protection.

Modify images

Add drivers

If you use an x64 Windows 10 image, add x64 drivers; if you use an x86 Windows 10 image, add x86 drivers.

Adding driver packages one by one. (.inf files) SampleDriver\driver.inf is a sample driver package that is specific to the computer model. Type your own specific driver path. If you have multiple driver packages, skip to the next step.

Multiple drivers can be added on one command line if you specify a folder instead of an .inf file. To install all of the drivers in a folder and all its subfolders, use the /recurse option.

Dism /Image:C:\mount\windows /Add-Driver /Driver:c:\drivers /Recurse

Review the contents of the %WINDIR%\Inf\ (C:\mount\windows\Windows\Inf) directory in the mounted Windows image to ensure that the .inf files were installed. Drivers added to the Windows image are named Oem*.inf. This is to ensure unique naming for new drivers added to the computer. For example, the files MyDriver1.inf and MyDriver2.inf are renamed Oem0.inf and Oem1.inf.

Important: If the driver contains only the installer package and doesn’t have an .inf file, you may choose to install the driver in AUDIT mode by double-clicking the corresponding installer package. Some drivers may be incompatible with Sysprep tool; they will be removed after sysprep generalize even if they have been injected offline.

In this case, you need to add an extra parameter to USB-B\AnswerFiles\UnattendSysprep.xml in order to persist the drivers in the image when the image will be generalized.

<PersistAllDeviceInstalls>true</PersistAllDeviceInstalls>

This property must be added to USB-B\AnswerFiles\UnattendSysprep.xml during generalize pass in order to persist the drivers in the image. For more information about the details of this property and how to add it to an answer file, see PersistAllDeviceInstalls.

If you install an update (hotfix, general distribution release [GDR], or service pack [SP]) that contains language-dependent resources prior to installing a language pack, the language-specific changes in the update won't be applied when you add the language pack. You need to reinstall the update to apply language-specific changes. To avoid reinstalling updates, install language packs before installing updates.

Add update packages

If you use an x64 Windows 10 image, add x64 update packages; if you use an x86 Windows 10 image, add x86 update packages.

To see what packages you'll need to get, go to the Windows 10 Release information page to see which packages you should obtain from Microsoft Update Catalog.

Type every single update package one by one into the search box and click Search.

After each search completes, click Download next to the version and architecture of the package you wish to download.

Tip

If you encounter an error that says “The website has encountered a problem” when trying to download your updates, try turning off the pop-up blocker in IE or temporarily disabling Protected Mode in IE.

After downloading your update packages, add them to the image one by one by using the following command, substituting the filename in the command with the name of the files that you downloaded:

Add OEM specific visual customizations

Create an OEM logo in .bmp format, with the size of 120px x 120 px. For more details, see the Windows Guidelines for System Builders.

Copy the OEM logo to the folder, for example: C:\mount\windows\Windows\system32\OEM\FabrikamLogo.bmp. You'll reference this file location later in the unattend file in OEM Information | Logo property.

To display an OEM specific desktop background picture, the image file must be placed in %windir%\system32\OEM*Fabrikam.bmp* directory. Verify that the path is same in answer file corresponding to oobeSystem > Microsoft-Windows-Shell-Setup > Themes > DesktopBackground property. See the below image to add desktop background in an answer file.

Modify Start layout

The Start tile layout in Windows 10 provides OEMs the ability to append tiles to the default Start layout to include Web links, secondary tiles, Windows desktop applications, and universal Windows apps. OEMs can use this layout to make it applicable to multiple regions or markets without duplicating a lot of the work. In addition, OEMs can add up to three default apps to the frequently used apps section in the system area, which delivers sytem-driven lists o the user including important or frequently accessed system locations and recently installed apps.

Create LayoutModification.xml.

Note: It is recommended to start with the sample on USB-B\StartLayout\LayoutModification.xml as it conforms to the samples in this guide (Example Only).

The Sample LayoutModification.xml shows two groups called “Fabrikam Group 1” and “Fabrikam Group 2”, which contain tiles that will be applied if the device country/region matches what’s specified in Region (in this case, the regions are Germany and United States). Each group contains three tiles and the various elements you need to use depending on the tile that you want to pin to Start.

Keep the following in mind when creating your LayoutModification.xml file:

If you are pinning a Windows desktop application using the start:DesktopApplicationTile tag and you don’t know the application’s application user model ID, you need to create a .lnk file in a legacy Start Menu directory before first boot.

If you use the start:DesktopApplicationTile tag to pin a legacy .url shortcut to Start, you must create a .url file and add this file to a legacy Start Menu directory before first boot.

For the above scenarios, you can use the following directories to put the .url or .lnk files:

%APPDATA%\Microsoft\Windows\Start Menu\Programs\

%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\

Save the LayoutModification.xml file.

Add your LayoutModification.xml file to the Windows image. You’ll need to put the file in the following specific location before first boot. If the file exists, you should replace the LayoutModification.XML that is already included in the image.

Note: If you don’t create a LayoutModification.xml file and you continue to use the Start Unattend settings, the OS will use the Unattend answer file and take the first 12 SquareTiles or DesktopOrSquareTiles settings specified in the Unattend file. The system then places these tiles automatically within the newly-created groups at the end of Start. The first six tiles are placed in the first OEM group, and the second set of six tiles are placed in the second OEM group. If OEMName is specified in the Unattend file, the value for this element is used to name the OEM groups that will be created.

Copy the answer file

You may want to make additional customizations through an unattend file. The sample unattend file on USB-B contains additional common customizations.

Use the following partition layout size guidance to determine the size of your recovery partition in CreatePartitions-<firmware>.txt files. The amount of free space left is after you copy winre.wim to the hidden partition.

Optional: This section assumes you’d rather keep winre.wim inside of install.wim to keep your languages and drivers in sync. If you’d like to save a bit of time on the factory floor, and if you’re OK managing these images separately, you may prefer to pull winre.wim from the image and apply it separately.

Commit the changes and unmount the Windows image:

Dism /Unmount-Image /MountDir:"C:\mount\windows" /Commit

Where C is the drive letter of the drive that contains the image.

This process may take several minutes.

Deploy the image to new computers (Windows installation)

On the technician computer, locate the following files in USB-B/Deployment. Please see Creating My USB-B to create and place the files in correct paths.

Note: There are several pauses in the script. You will be prompted Y/N for the Apply operation if this is a Compact OS deployment.

Note

Only use Compact OS on flash-drive-based devices (solid-state drives), because Compact OS performance depends on the storage device capabilities. Compact OS is NOT recommended on rotational devices. For more information, see Compact OS.

Remove USB-A and USB-B, and then type:

Exit

Update images manually by using AUDIT MODE (online servicing)

Important: Connecting the computer to internet is not recommended during manufacturing stages. We don't recommend getting updates from Windows Update in audit mode, as it will likely generate errors when you generalize + sysprep the machine from audit mode.

Add Office apps to your image

To add the Office apps to an image, use DISM with the /Add-ProvisionedAppxPackage option. This option also requires the following information for each app you add:

/PackagePath: This is only used to specify the path to the .appxbundle file for the shared code package.

/OptionalPackagePath: This is used to specify the path to the .appxbundle file for an individual app, such as Word or Excel.

/LicensePath: This is used to specify the path to the _License1.xml file for an individual app. This is needed for both the shared package and each of the optional app packages.

Use DISM to add all the Office apps to an offline image. The following example assumes the appxbundle and license xml files are in subdirectories on USB-B (D:). The example also excludes the /region switch because we want Office to appear in both the All Apps list, and as a Start Menu tile.

Once the machine is booted to desktop after going through OOBE, the Start menu will have the Office tiles added to the Start Menu.

Prepare recovery tools

Push-button reset can help users recover the OS while preserving their existing data and customizations without requiring them to back-up their data in advance.

Any languages, Universal Windows apps and Universal Windows drivers that are included in your image are automatically restored during push-button recovery operations. Make sure other customizations, like desktop apps and Start Menu customizations get restored, too.

In Windows 10, version 1809, you can use auto-apply folders to restore common Windows settings such as the Start Menu, taskbar layout, and OOBE customizations. For previous Windows versions, or to perform other actions after a push-button reset, use extensibility scripts instead. Sample extensibility scripts are included in the USB-B sample files.

Copy the ScanState tool to your USB key

The ScanState tool is included in the USB-B sample files you downloaded earlier.

You'll use ScanState tool to capture your classic Windows apps and settings so they can be restored later during a push-button reset recovery.

You can also get a copy using the tools in the Windows ADK:

On your technician PC:

Start the Deployment and Imaging Tools Environment as administrator.

Run the CopyDandI.cmd script to copy the files to your USB key:

x64:

CopyDandI.cmd amd64 E:\ScanState_amd64

Where E: is the letter of USB-B drive.

If you're using an x86 Windows 10 image, make x86 Scanstate directory:

CopyDandI.cmd x86 e:\ScanState_x86

Where E: is the letter of USB-B drive.

Create a recovery package

On your reference PC:

In Windows 10, version 1809, create auto-apply folders to restore common Windows settings such as the Start Menu, taskbar layout, and OOBE customizations.

Create a folder in your Windows image called C:\Recovery\AutoApply

MkDir C:\Recovery\AutoApply

Copy configuration files and the related asset files

Unattend.xml:

copy Copy the unattend.xml file you want for recovery to `C:\Recovery\AutoApply\` and any asset files to `C:\Recovery\AutoApply\CustomizationFiles`

Important: By default, non-major updates (such as ZDPs, or LCUs) are not restored. To ensure that updates preinstalled during manufacturing are not discarded after recovery, they should be marked as permanent by using the /Cleanup-Image command in DISM with the /StartComponentCleanup option.

Deploy the image

Use the deployment script to layout the partitions on the device and apply the image. The applyimage.bat in USB-B\deployment folder will partition the device based on device mode.

Important: The Recovery partition must be the partition after the Windows partition to ensure winre.wim can be kept up-to-date during the life of the device.

Run the following command to deploy your image to the reference PC:

E:\Deployment\applyimage.bat E:\Images\modelspecificimage.wim

Note: There are several pauses in the script. You will be prompted Y/N for the Apply operation if this is a Compact OS deployment.

Note: Only use Compact OS on high end storage devices because Compact OS performance depends on the storage device capabilities. Compact OS is NOT recommended on rotational devices or storage greater than 32 GB. For more information, see Compact OS.

Finalize deployment

Upon deploying your model specific image to destination computers, boot the computer with master image for the first time in AUDIT mode

Important: In order to minimize the first boot time, (Boot > Specialize > OOBE > Start screen) specialize pass must be completed in the factory. Specialize pass will configure hardware specific information which Windows will run on.

If you want to apply additional steps, such as executing OEM diagnostics tests and so on, apply them here.

Finally, run the Sysprep tool (C:\Windows\System32\Sysprep\sysprep.exe) and seal the system back to OOBE and Shutdown but withoutGeneralize.

The system is ready to ship.

Important: If you are manufacturing a small amount of devices without using an image managing tool such as disk duplicators or Windows Deployment Service, you can choose to use the following practice:

You can manufacture those devices by first booting in WinPE - inserting USB-A.

Then insert USB-B where final manufacturing image is contained.

Run the applyimage.bat script to apply the image.

After you applied the image, follow the steps in this Finalize deployment section.

Now the device is ready to be shipped with your final manufacturing image and PBR feature implemented.

Finally, replicate the same procedure with the other devices.

Appendix

Differences between 64-bit and 32-bit deployment

It is recommended to consider 64-bit deployment versus 32-bit deployment disk footprint according to the storage of the device you are manufacturing.

The overall deployment flow mentioned in this guide doesn’t differ between 64-bit and 32-bit deployment. Only some of the resource versions and the way those resources are created differs. The following table covers the x64/x86 distinctions.

Distinction

Description

Related Section

Windows installed on technician PC

When Windows ADK gets installed on a technician PC the deployment tools in the ADK would be installed according to the architecture of the Windows on technician PC. In short if ADK is installed on Windows x64, the tools would be installed 64-bit version, or vice-versa.

What you will need and where to get it

Before starting the deployment procedure OEM requires to download certain kits which will be used throughout the guide, such as Microsoft Office, update packages, language interface packs. Below is the complete list of resources/kits an OEM requires to download and where they download them.