Information
We have multiple tutorials on Ten Forums about creating a custom Windows install media and automating Windows Setup and OOBE. All those tutorials are intended for advanced users, requiring downloading and installing Windows 10 Assessment and Deployment Kit (ADK), and some extra work.
This tutorial is a Quick Start guide and requires no additional downloads. A sample answer file will be provided, you only need to change a few simple lines in it to make it to work for you. The procedure is easy and fast, you will manage it even if you have no previous experience in customizing install media and answer files.
When done, you have a Windows 10 install media which fully bypasses all steps of Windows Welcome (OOBE), not asking or expecting any whatsoever user input. Region and keyboard will be automatically selected, user accounts created, and so on.
Note
This method requires Windows image in a WIM file. An ISO or USB flash drive created with Windows Media Creation Tool contains Windows image in install.esd file instead of install.wim, and therefore it cannot be used.
To download a WIM-based ISO, open Windows Media Creation Tool page in browser, press F12 to open developer tools, select Emulation tab, and change user agent string to Apple Safari. Wait the page to refresh. You can now download a WIM-based ISO:
(Click to enlarge.)
Full instructions to get WIM-based ISO, see Option Three in this tutorial: Download Windows 10 ISO File
When downloaded, delete install.esd file in Sources folder of your USB install media. Mount the WIM based ISO, and copy install.wim file from its Sources folder to Sources folder on USB.
1.1) Plug in a USB flash drive containing Windows 10 install files. Alternatively, mount a Windows 10 ISO (tutorial) and copy its contents to a folder, for instance D:\ISO_Files
Note
Working with an offline Windows image and saving changes to it requires some free storage space. I recommend not mounting image from USB smaller than 16 GB. If your Windows install USB is smaller, I recommend that you copy the install.wim from USB to hard disk and mount it from there instead, then when committing (saving) changes as told in step 3.1, replace the original install.wim on USB with the modified one.
1.2) An unattended answer file must be added separately to each edition on your Windows install media. If install media contains multiple editions, we need first check the edition index number for preferred edition.
Open an elevated Command Prompt (tutorial). Enter following command to list all editions and their index numbers, replacing X:\ with actual drive letter for the plugged in USB flash drive:
Dism /Get-WimInfo /WimFile:X:\Sources\install.wim
In my case now, the multi edition USB is drive L: and index number for PRO edition which I want to customize is 6:
(Click screenshots to enlarge them.)
In case of using ISO instead of USB, use following command, replacing D:\ISO_Files\ with actual path to folder where you pasted contents from a mounted ISO:
Dism /Get-WimInfo /WimFile:D:\ISO_Files\Sources\install.wim
1.3) In File Explorer, create a folder for mounting Windows image. In this example I use folder C:\Mount. Be sure that the drive where you create Mount folder has at least 15 GB free space.
1.4) In Sources folder, either on your USB media or folder containing files copied from ISO, check that install.wim is not write protected. Right click the file and select Properties. Check the Read Only attribute, if it is selected as in screenshot below, unselect it and click OK to save changes:
1.5) Mount Windows image with following command:
Dism /Mount-Image /ImageFile:X:\Sources\install.wim /Index:6 /MountDir:C:\Mount
Again, replace the X:\ in /ImageFile switch with actual drive letter for your USB media, or path to folder containing files copied from ISO image. Also, replace the index number with index of your preferred Windows edition:
1.6) Open folder C:\Mount (the folder you created to mount image) in File Explorer. You will see the mounted Windows image. Open Windows folder, and create a new folder in it. Label the new folder as Panther:
2.1) Download the sample answer file:
Download
Remember to unblock the downloaded file (tutorial) before opening it for editing!
2.2) Open answer file in Notepad or other text editor. Edit / change following details in it (screenshot shows the sample answer file, numbers refer to list below):
1.) Value for processorArchitecture must be amd64 for 64 bit Windows on both AMD and Intel 64 machines, x86 for 32 bit Windows. Notice that the value can be found in three places in this answer file
2.) InputLocale is preferred, default keyboard layout, in this sample my default Finnish (040b:0000040b). UILanguage is the language of your Windows install media, in this sample British English (EN-GB). Set SystemLocale, UILanguageFallback and UserLocale to same than UILanguage.
Some common locale values:
- Brazil - Portuguese > 0416:00000416, pt-BR
- Canada - English > 1009:00000409, en-CA
- Canada - French > 0c0c:00011009, fr-CA
- France - French > 040c:0000040c, fr-FR
- Germany - German > 0407:00000407, de-DE
- UK - English > 0809:00000809, en-GB
- USA - English > 0409:00000409, en-US
Complete list: Default Input Profiles (Input Locales) in Windows | Microsoft Docs
3.) ProtectYourPC (read more) value can be 1, 2 or 3:1 = Recommended (default) level of protection
2 = Only updates are installed.
3 = Automatic protection is disabled.
4.) User accounts are created in LocalAccounts . Description can be whatever you want to, DisplayName (name shown in Windows) and Name (user profile folder name) don't have to be same. Group tells in which user group this account belongs, always create at least one user in Administrators group.
In case you want to create multiple accounts, just add new LocalAccount sections:
Code:<UserAccounts> <LocalAccounts> <LocalAccount wcm:action="add"> <Description>Local admin account</Description> <DisplayName>Admin</DisplayName> <Group>Administrators</Group> <Name>Admin</Name> </LocalAccount>> <LocalAccount wcm:action="add"> <Description>My Main User Account</Description> <DisplayName>Kari</DisplayName> <Group>Users</Group> <Name>Kari</Name> </LocalAccount> <LocalAccount wcm:action="add"> <Description>Account for guests</Description> <DisplayName>House Guest</DisplayName> <Group>Guests</Group> <Name>Visitor</Name> </LocalAccount> </LocalAccounts> </UserAccounts>
5.) RegisteredOrganization and RegisteredOwner are optional, value can be whatever you want it to be. Remove these two lines if no values will be set. TimeZone, also optional, is as name tells default Windows time zone. If none is given, default time zone for selected region will be used, for instance if region is USA, Pacific Time would be used.
See all values: Microsoft Time Zone Index Values
6.) Everything in OEMInformation tags is optional, you can remove lines as you wish, or even the whole section. If you want to use OEM logo (#1 in next screenshot), make a 120*120 pixel bitmap image (.bmp), and save it in your mounted image (C:\Mount) in Windows\System32 folder as oemlogo.bmp
In Model you can add whatever, for instance MyMonsterRig 2019. It as well as SupportHours, SupportPhone and SupportProvider (#2 in screenshot) can be whatever you want to. SupportURL (#3) creates a link in Control Panel / System and Settings / System / About for whatever valid link provided:
7.) ComputerName can be max 15 characters. It cannot contain any spaces or the following characters:
{ | } ~ [ \ ] ^ ' : ; < = > ? @ ! " # $ % ` ( ) + / . , * &
The asterisk *, although an invalid character in computer name, can be used alone as in this sample answer file to generate a computer name with a 7 character acronym from RegisteredOwner and RegisteredOrganization, followed by a hyphen and a random 7 character alphanumerical string. For instance, as in this sample the owner is Kari and organization is TenForums, the virtual machine I used for screenshots got computername KARITEN-CGELBMB.
This is practical when you want to use same install media on multiple machines, to avoid same NetBIOS names on network.
8.) OEMName (optional), whatever you'd prefer.
2.3) Save the modified answer file as unattend.xml in C:\Mount\Windows\Panther folder you created in step 1.5:
3.1) In elevated Command Prompt, enter the following command:
dism /Unmount-Image /MountDir:C:\Mount /Commit
That's it! You can now boot a computer or virtual machine with your modified install media. Run Windows Setup, partition disk as you'd prefer and run installer. When setup restarts to OOBE, everything will be automatic. First interaction required is the password; as the answer file created user accounts without password, you are required to set it. You will be shown this screen:
Click OK. Next screen asks for password change. Leave the top most field Password empty, enter and confirm your new password, click the right arrow button to proceed to desktop. If you'd prefer to set no password, just click the arrow button:
Easy and fast!
Kari