OK, now it’s time to create an answer file to automate Windows Welcome (OOBE). To do that, please launch the Windows SIM and create a new answer file (File > New Answer File). Because you already created the catalog file in a previous post in this series (Part 2) you don’t have to go through the long and time-consuming process of creating it again. Just click Yes when WSIM asks if you want to open an image and browse to and select the catalog file you created earlier:
Let’s first add the necessary components from the Windows Image pane (WSIM bottom left) to the Answer File pane (top middle). First come the region and language components. Expand Components in the Windows Image pane, right click the Microsoft-Windows-International-Core and select Add Setting to Pass 7 OobeSystem:
Expand Microsoft-Windows-Shell-Setup, add OEMInformation to Pass 4 Specialize:
In similar fashion, please add Microsoft-Windows-Shell-Setup > OOBE and Microsoft-Windows-Shell-Setup > UserAccounts to Pass 7 OobeSystem. Your Answer File pane should now look like this when it’s fully expanded:
Edit OEM information
OK, all necessary components now added. Next, we’ll start from the top-most component added to Answer File pane. Select Microsoft-Windows-Shell-Setup under 4 Specialize, add the following properties:
- ComputerName > If this is left empty, Windows Setup names each machine something like DESKTOP-123ABCD or WINDOWS–123ABCD where 123ABCD is a random alphanumeric string. Using just a single asterisk (*) for ComputerName, the word DESKTOP or WINDOWS will be replaced with a max 8-character string composed from RegisterdOrganization and RegisteredOwner values. And again, the trailing characters in the name will be a random alphanumeric string. For instance, as shown in the preceding screenshot, in my answer file the RegisteredOrganization is Win10.guru and the RegisteredOwner is Kari, which produces PC names of the form KARIWIN-123ABCD. Finally, you can also specify a PC name that is a maximum of 15 characters in length. However, this is not recommended because in that case each PC would get exactly the same NETBIOS name. Alas, this causes networking issues in both Workgroup and Domain environments.
- CopyProfile > True. This will copy all desktop customizations, themes and such to the default user profile. This will be used as the starting point for each new user profile.
- OEMName > As you like, this may be supplied or left empty
- RegisteredOrganization > Ditto preceding item.
- RegisteredOwner > Ditto as for OEMName and RegisteredOwner.
- TimeZone > If this is left empty, the default time zone will be that for the installation language. Thus for example, installing US English Windows 10 defaults to Pacific Time, installing Finnish Windows 10 defaults to Finnish time. Because I usually install the UK English Windows 10 although I live in my adopted home country Germany (where the time is UTC + 1 / UK Time +1), I need to specify the TimeZone as CET, Central European Time, or as it appears in the answer file, W. Europe Standard Time. (You can find a full list of Microsoft Time Zone index values at Microsoft Docs: https://docs.microsoft.com/en-us/previous-versions/windows/embedded/ms912391(v=winembedded.11).
Next, expand Microsoft-Windows-Shell-Setup under 4 Specialize in the Answer File pane, select OEMInformation in the Answer File pane, and add the following properties:
- Logo > Optional. If you want to add an OEM logo to the captured Windows image (capturing will be done in Part 5 of this series), make it a 120*120-pixel bitmap image labeled oemlogo.bmp. You must provide the full path where the logo image will later be stored. I recommend using C:\Windows\System32\oemlogo.bmp
- Manufacturer > As you like, this may be supplied or left empty.
- Model > Ditto preceding.
- SupportHours > As you like, this may be supplied or left empty. Examples: MON-FRI 09 – 17, Monday – Friday 9AM – 5 PM, Weekdays 09-22 Saturdays 09-15 Sundays closed
- SupportPhone > Ditto preceding.
- SupportProvider > As you like, this may be supplied or left empty.
- SupportURL > Ditto preceding.
Region & language
Next come the region and language settings. Select Microsoft-Windows-International-Core under 7 OobeSystem in the Answer File pane and add properties as you see fit. See Part 2, the previous part in this series of posts. You should set the region and language exactly as you did in the autounattend.xml file: Windows 10 Unattended install media – Part 2: Answer file for Windows Setup. You’ll find correct settings under the subtitle that reads “Regional and language settings.”
Automate the OOBE
Select Microsoft-Windows-Shell-Setup under 7 OobeSystem in the Answer File pane. Here, please add the same RegisteredOrganization, RegisteredOwner and TimeZone you added earlier for Settings Pass 4, as shown and described earlier in this blog post.
Under 7 OobeSystem, select Microsoft-Windows-Shell-Setup > OOBE, and add following properties:
- HideEULAPage > True
- HideLocalAccountScreen > True
- HideOEMRegistration > True
- HideOnlineAccountScreens > True
- HideWirelessSetupInOOBE > True
- ProtectYourPC > 1 = Recommended (default) level of protection, 2 = Only updates are installed, 3 = Automatic protection is disabled.
- UnattendEnablerRetailDemo > False
Notice that NetworkLocation, SkipMachineOOBE and SkipUserOOBE are all deprecated components, although they still appear in WSIM:
Setting properties for deprecated components causes validation issues and might cause Windows installation to fail. Please leave them alone!
Because we will use the Windows built-in admin account to customize our Windows image later in Part 4 of this series, a C:\Users\Administrator profile folder will be created and shown to end users although that account itself will be disabled when we sysprep the image. To hide this Administrator folder, select Microsoft-Windows-Shell-Setup > OOBE > VMModeOptimizations under 7 OobeSystem and set the value for SkipAdministratorProfileRemoval to False:
Optional: Select Microsoft-Windows-Shell-Setup > UserAccounts > AdministratorPassword under 7 OobeSystem and set a password for the built-in admin account. Be sure to note it somewhere safe and accessible. When answer file is saved that password will be encrypted (and extremely difficult, if not impossible, to recover unless you’ve recorded it somewhere):
Optional: If you want to add an Active Directory domain and domain account(s), right click Microsoft-Windows-Shell-Setup > UserAccounts > DomainAccounts under 7 OobeSystem and select Insert New DomainAccountList:
Select the new DomainAccountList, and add your local domain:
To add domain users, right-click the new DomainAccountList, select Insert New DomainAccount:
Click the new DomainAccount, add the user group and domain account name:
Repeat the last two steps for each domain account you wish to create.
To create a local account, right-click Microsoft-Windows-Shell-Setup > UserAccounts > LocalAccounts under 7 OobeSystem and select Insert New LocalAccount:
Select the new LocalAccount item in the Answer File pane, add an account description (optional), a DisplayName as you want it to appear in the sign-in screen and Settings, plus a group and account profile name (how, for instance, the user folder will be named in the C:\Users folder). Notice that Display Name and Account Name don’t have to be the same:
OPTIONAL: Expand a newly created local account, and set its password. As for the built-in admin password discussed earlier, be sure to record it somewhere safe. As before, when the answer file is saved, all passwords are encrypted:
If no password is set for a local account, user will be asked to set / change password when automatic installation is ready to boot to desktop. As no password is set, Current passwor box should be left empty, new password added and confirmed:
Repeat the steps to create more local users; for each additional user, right-click Microsoft-Windows-Shell-Setup > UserAccounts > LocalAccounts under 7 OobeSystem and select Insert New LocalAccount and proceed from there.
One final step: delete any components from the Answer File pane that are not required, or not needed. In my case, I do not want to set up any domain accounts, nor will I set up a password for local accounts. To that end, right-click any component you wish to remove and select Delete:
Next, please validate the answer file as described in Part 2, then save it as unattend.xml.
That’s it. In the next part we will install Windows 10 version 1803 on a reference Hyper-V virtual machine and start customizing the Windows image.
Links to all five parts:
- Windows 10 Unattended install media – Part 1: The Basics (published 05-APR-2018)
- Windows 10 Unattended install media – Part 2: Answer file for Setup (published 07-APR-2018)
- Windows 10 Unattended install media – Part 3: Answer file for OOBE (published 09-APR-2018)
- Windows 10 Unattended install media – Part 4: Customize Windows Image (published 11-APR-2018)
- Windows 10 Unattended install media – Part 5: Sysprep & Capture Image (published 12-APR-2018)
Author: Kari Finn
A Windows Insider MVP, Kari started in computing in the mid 80’s writing code for VAX / VMS systems. Since then, he’s worked in a variety of IT positions. He specializes in Windows image capture, customization, repair and deployment as well as Hyper-V virtualization. Kari is a proud Team Member at number #1 Windows site TenForums.com.