Apply unattended answer file to Windows 10 install media  

Page 1 of 2 12 LastLast
    Apply unattended answer file to Windows 10 install media

    Apply unattended answer file to Windows 10 install media

    How to apply an unattended answer file to offline Windows 10 image (USB or ISO)
    Published by Category: Installation & Upgrade
    19 Aug 2019
    Designer Media Ltd


    information   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   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:
    Apply unattended answer file to Windows 10 install media-user-agent.jpg
    (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.) Mount Windows Image

    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   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:
    Apply unattended answer file to Windows 10 install media-check-index.jpg
    (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:
    Apply unattended answer file to Windows 10 install media-read-only.jpg

    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:
    Apply unattended answer file to Windows 10 install media-mount-image.jpg

    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:
    Apply unattended answer file to Windows 10 install media-panther.jpg

     2.) Sample Answer File

    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):
    Apply unattended answer file to Windows 10 install media-answer-file.jpg

    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:
    Apply unattended answer file to Windows 10 install media-system.jpg

    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:
    Apply unattended answer file to Windows 10 install media-unattend.jpg

     3.) Commit (Save) changes to Windows Image

    3.1) In elevated Command Prompt, enter the following command:

    dism /Unmount-Image /MountDir:C:\Mount /Commit

    Apply unattended answer file to Windows 10 install media-commit.jpg

    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:
    Apply unattended answer file to Windows 10 install media-password-change.jpg

    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:
    Apply unattended answer file to Windows 10 install media-new-password.jpg

    Easy and fast!

    Kari


  1. Posts : 1,517
    Windows 10 Pro (32-bit) 16299.15
       #1

    This is very good timing Kari!
    I was looking to do almost exactly this, to solve my problem with OOBE locking up on VirtualBox and also my old & slow physical laptops. (Which still seems to be a problem in 1903, from the build I've tried so far.)
    Insider ISOs - can't get past OOBE stage Solved - Windows 10 Forums

    If I can do it in the install media then am I right in thinking I can still use one install media set but choose different partition layouts at the early stages of Setup on a Clean Install?
      My ComputerSystem Spec

  2. Kari's Avatar
    Posts : 16,340
    Windows 10 Pro
    Thread Starter
       #2

    DavidY said: View Post
    If I can do it in the install media then am I right in thinking I can still use one install media set but choose different partition layouts at the early stages of Setup on a Clean Install?
    Yes. You boot to install media normally, click Install, select Custom install and partition as you'd prefer, or use DISKPART to manually do the partitioning. I left the partitioning intentionally out from this tut.

    The method in this tutorial only takes care of OOBE, everything after Windows Setup has done the first restart.

    Kari
      My ComputerSystem Spec


  3. Posts : 1,517
    Windows 10 Pro (32-bit) 16299.15
       #3

    Thanks Kari,

    That's what I hoped.

    That initial part works fine when I try it; it's only the OOBE screens for keyboard layout and onwards where Windows gets itself into some sort of deadlock when I clean install from 1809 onwards. (1803 etc work fine on the same machines.)
      My ComputerSystem Spec

  4. Kari's Avatar
    Posts : 16,340
    Windows 10 Pro
    Thread Starter
       #4

    DavidY said: View Post
    That initial part works fine when I try it; it's only the OOBE screens for keyboard layout and onwards where Windows gets itself into some sort of deadlock when I clean install from 1809 onwards.
    Knowing how experienced user you are, I sincerely recommend you to try MDT deployment to avoid all possible setup and install issues: Microsoft Deployment Toolkit - Easy and Fast Windows Deployment | Tutorials

    Kari
      My ComputerSystem Spec


  5. Posts : 1,517
    Windows 10 Pro (32-bit) 16299.15
       #5

    Kari said: View Post
    Knowing how experienced user you are, I sincerely recommend you to try MDT deployment to avoid all possible setup and install issues: Microsoft Deployment Toolkit - Easy and Fast Windows Deployment | Tutorials

    Kari
    Thanks Kari,
    I'm a bit out of practice, but I will certainly look into MDT - it's not something I've looked at before.
      My ComputerSystem Spec


  6. Posts : 66
    Windows 10 Pro
       #6

    Is there any way to apply this on OOBE /OOBX setup during Win installation?

    I am looking for this perticulerly (See section B)
    Need Help for Windows settings/tweaking via Reg hacking & For NTLite
      My ComputerSystem Spec


  7. Kari's Avatar
    Posts : 16,340
    Windows 10 Pro
    Thread Starter
       #7

    SM03 said: View Post
    Is there any way to apply this on OOBE /OOBX setup during Win installation?
    This does exactly that, automates OOBE, no questions asked during the OOBE phase of Windows setup.

    Kari
      My ComputerSystem Spec


  8. Posts : 66
    Windows 10 Pro
       #8

    Kari said: View Post
    This does exactly that, automates OOBE, no questions asked during the OOBE phase of Windows setup.
    Kari
    no, you ain't getting this what I am asking.
      My ComputerSystem Spec

  9. Kari's Avatar
    Posts : 16,340
    Windows 10 Pro
    Thread Starter
       #9

    SM03 said: View Post
    no, you ain't getting this what I am asking.
    Maybe you could then explain it in a way that I can understand? To start with, there's no such thing as OOBX when it comes to Windows.

    Kari
      My ComputerSystem Spec


 
Page 1 of 2 12 LastLast

Tutorial Categories

Apply unattended answer file to Windows 10 install media Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


Related Threads
Installing Windows 10 is done in three phases: Boot from install media, run Windows Setup Configure hardware devices Windows Welcome (OOBE) In normal install, user interaction is required in phases 1 and 3, phase 2 being run automatically...
Followed Kari's excellent tut - Create media for automated unattended install of Windows 10 WSIM Getting the following Answer File Validation problem: The setting has not been modified. It will not be saved to the answerfile....
The problem with my answer is that following error message appears "Windows cannot read the <ProductKey> setting from the unattend answer file". Can someone help me with this problem? Can I somehow skip this product key part in the answer file? ...
Anyone ran across a Windows 10 XML file generator for unattended setup? That Works!!!:D
Do you have any idea how to create Windows 10 autoattended file ? It is normal for system builder use. Any help would be appreciated.:):)
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 13:47.
Find Us