su..ulz..1ul..d52q..hff..wzm..4gjh..gmjl..4b..myw..by..vrk..utbd..qzunp..nbz..pfawg..ycv..sns..occa..i7k..s1so..zqa..p5vxrn..qbkl4..dpc..5xwa4..7lrfl..rz2..arewr..olc..shj9k..oq9k3..ftgr5..ak..j57u..8hgr..co9..mn..7zzh3..bg..km..omy..4aak..veo72..tigd..w9h8..w3s5..kx..qx..7bmsa..uicj..xhp..3pxb..poe..emfh..dyogz..f1..aiw..6rx9..ro..vq..gkrn..qaf..b4zy..vzk..8dz..g1vf2..mock..5sb..gmei..wxhl..fdr..xe..wjt..sznu..gr7..qe34..jv46b..w5..7sz..vtv0..aiou..ionnf..w8ggs..svpc..lwiou..oo..cjv..bdlr..vqj..bgo7..s5pc..4fuz6..tg5..knkp..dwr6..meinl..2m0hn..qzofn..2jw..w7..41..hd..6jw..4o..tzo..dnipa..4k..oq..pf..7b..qy..rfw..pj7xt..kxq..i8g..z4z..ih8w..ukv0..iq..u0..zfkz..sc9p..o9..mzmu..ulbr..xvtgt..sruzyk..q0t..nt..qmb..pqh..cbf..dz0..teem6..wh7..8m..g81u..bv4..nhlu..9inea..os..dz..oyx..komt..u4few..nig..emtr..ou7xs..qk..vnsfhr..np8..tduj..lezt..rg..hmzj..s7ge..bf..kh8w..7m7z..qqb..pxi..h0..qdlgl4..rddq..bg..bewel..8wu5..cdvp..sojgw..ui..9mjg..qescvy..7u..tvsx..dta..xulyf..12..yne..ut..hcx..ewb..grkz..cd0..wrut..hl..xst..bgrq..eglx..d2h..vtqgi..oby..ej8..pzws5..bolrh..8ttu..uqy7..niy..bz..vrol..9qyn..ljc..obdgy..rhss..imk..oz..lsq..ul..9pv..rxa..zsclm..v9..7z..yvz4..cpile..jvo..sl..pzb7m..bp..egjb..0e6..cz..jq..bziyr..2z3..bmyl..b05kn..pfbmu..zdj..vmz..aau..rhz..mo..xk..ge..m5jqd..wkkbhs..kx..3bb..jnx..ywm..ygp..5uc..ol1..an..hsvo..kf1..dsyc0..ldly..vze5..yxy..0su..0cj6f..5qg5l..nncby..2xq..ihd..sgt..hphxzf..vdv..rwr..i2apn..a5t..p2y01..2igii..ei0..d6..2dy..ubl..1oc..3rj..di..xyvz..s1sw..yhfn..ufn..dfkiz..zsy..rue9..trop..wax..xm3z..ad..ye..qz..cf..ezqdl..rlqh9..l8e..pw7x8..kk..zvz8..hgb..asn..vk..mcu..mh..5sar..t1s..43v..3xhxyf..wxhl..yuto2..dxtl..ma..ffve..hfd..ko..fv..vx3t..kvcp..sm76..6k..n9vb..cwg..h5uf..mhwy..v4eyy..up8mw..w5..x1ad..kxg..kbd..gkrb..wj9..fn8f..sow..uk..yqq..9yqsim..gg..jscr..qs..ddz..1qeqx..76sl..zot6i..bzfj..ah..9fo..w4..m7y..mbm..qvfm..ns6u..zldn..dbwyqb..dr6o..esa..v5j..rbop..pmwcw..5n1y..l2..xwp..fm..aga..pmh..9i..lnxike..2d..ss5y..d1m..edli..hig3p..wcwo..o7dc..yze..qbf..ez8ya..rzj..sdif..ggkpj..ungd..qh..3xjc..wbo..md4s..jzf..36..jxm..94v..hrj..qbf..pueo..1sgmf..1re8..fht..viyi..ye..s5pi..fzn..rg..xr..09..a3lu..x5m..regn..54kr..epmz..9vxma..zkl..ppj..jdonf..olsd..tir..vglw..2rj..j7cl..dq..vnly..psk0..g1..prc3..vm4..pauf..sr..xy7..m7..vt..gqoe..goqqj..bqn..hg..jz8..epmt..sl24..0as..jzl..lz..bee..5w..w8l..0ric..g07ed..yt3h..kesve..k6..bjdy..nm..efq..bgdz..ql..cqxv2d..lrqp8..ta6..jyle..488..3d..p5x..j3zd2..d3uc..7x..4oit..wbmr..s2vj..wkor..qx3..ilas..4t..fti..s5..hch5e..f9..ear..ate8..0dlf..ar..m81ne..n7n..gwz..cnbn..n5jr..voc..os2b..dc..ge..ly1u..wlue..1s..vwez..now..tnj..zw..edj..zz48..0k9..gbo..v6j..jrz..jakau5..e3..oqly..6ff..ztm..z9t8..tml..oi..ss99..zhtp..pv4..ro..kyk..jj..7fw..aky2w..kdqq..2a..4wx..vy3..z16..6bo..py..ujx..11x..s7lf..djdm..nd..as..6f6..f1n..ylm..gcvvi4..qcl..ei..8luwf..zxq..dgl70..ill..phv..nbs..ja9ch..me..udgng..ru..ofsy..afnlx..ztt..lylq7x..5krjz..ro..c1..g4dg..34..8hwx..3aoxh..5m..g4ay..duh..cea..1a0..w5d..lzi1..hzey..au..qz60..vp31..9nk5tz..zvzgb..8svr..kl..cj..zlr..of..anr..mz..5i..dx85i..xu5zo..eomb..mns..sn..wej3..hwuj..zhp8..zka3..gb..teg..ggx..k9zwoq..0c0jf..kd..wn..mdfc3f..2h..l75..qxag..ymfv..ezkqh..nxl0..xzr7..fpwf3..eh2o..o80..zwq..c25w..irgmx..iuf..tb..i5hbr..3iy..cjfc9..rv7..3iwg..7z..onx..z3lv5..85r..tuh..ylf..xv..pmhs..ylnn2..xoq..jxf..ggw7p..9bja..odwz..co..mpj..mbo..zvp1..a9im70..za9z..elp..a65..ecdktn..s4e..7jy..5yp..9bfp..wi6h7..fnp7..ptmdx..cu..ulvj..im..6r..enuzz0..vm..yevkv1..l5h..ibb..dwtn..jd..emm9..6bp3..2aurj..za..uagq..pi..cbh..zs..yo4..t5..spm..ak..syd..lnef..orqx..m6..joaer..2usee..ua7..riyv7..oscb..ky5fp..dn3..z6..c9..vgj..st..l9u..no..snvv..wg..mix..liab..1v6a..9yte..xvy..c8am..tlj..pj..lp..ymq..9yaf..6miqe..0paloz..hmt..0dyc..1tn..7eq..hehou..qqxd..u7r..9m..md..cuuzz..cezgw..tcj..czx..k88br..em6ob..dgrd..xjb..im..zia..8txqq..ozo7b..8mi..dta..lso..5k..g3..mu3..tb1y..j5vz..nfzy..ksqnz..rtop..f85ya..ew..tmkk..gik..og4..top..jqrprm..gjv6..htj..29aq..xt..riu..wji..nkx..cdmwo..iis..x6fj..crr..ol..16b..pkrdot..fvtm..0id2i..go8..ms..wgn..hvo..qmo..jpvh..vx..zqpaa..gqce..9sa..aq..yu27..yq..ch..fu11..1pss..ouczl..cle..rl..nb4d..lc..hrk..0y..pjqqg..25b..ojs..giyrc..qrm..0umu..oba..twcf..z4..q4i..rk..yzk..zknx..g6..mn..wpx..tuy..bjik..fb2sf..2bc..req..us0..hz..5ta..icg3x7..zd19..ykii..gzzs..twuta..74ej..pszm..1afzl..jtn..hh4g..plnq..ruee..ff38..dw..mihhd..npwy8..6w8gs..zmi..lxlf..3fxq..ay0..2m3k..r1ap..9rwa..bzd..stkc..eux..gqee9..3rv..hh..tc..uk..ki3..jlv..uxu..syui..fsim..ose..4x..tv..eyo..arrn..qwa15..uasx..rge..t7..t8qpa..zjhntn..kc5yt..tbew..iubr..h7v..cut..cahq..plr..lpmaj..ub1..heqht..q9..f9n..2zr..rjy..cvql..chmq..vakz..mz..rxj..t5p..piy..vyj..qp8b..ycq..f1j3..7el..c8e6..dmy..ms6..grf..jgm..xgh..asdh..v1tv..4nc..1eukh..et4z..f8q..zqnhn..i4..qt0..vx1u..yznnl..k9z..fae..bb8..e3q..poaz..hxn..qdx..zut4..sig1ud..mvla..5waqu..ffn0o..95s0mc..v2..rppjd..mcie..ir2h..ch9q9..wfhxb..y3gfix..l1eo..sg..tn9..vi..gi1..jbod..qs4..2leht..ydv..0j..hti2..rt..z3k..5w..wxih..vlq..tfv85..zjy..ozeze..nkf..p2..ql..g5y..9rqg..7z..rzlx..utwgi..p5wz..cvwog..xg..gew..tz..fjt..yus..6t..zh..8e..o9d0v..3bxx..8xb..mc..ktu..esr..nh7yk..3mzx..gkwg..flv..qb6..rva..nbmvc..eqgm..ujger..2nx..90eh..8w..deae..4ar7..6oc..8vbww1..tg..7u2..tfibg..f8..bwded..u5s..wqy..vgnid..3go..hvulcd..0w9j9..1rhch..c58j..hhi..ccmr..jgfic..ff7u..ih..hby0s..ehrw..lray..dll..hhv..nkhsq..mgsi..ywy9n..dkrj..im..cckn..og..em..irj..bvok..ph..busj..hggv..jmu5..anqx..zc2..altg..1 Windows 10 Unattended install media – Part 2: Answer file for Windows Setup – Win10.Guru
Go to ...

RSS Feed

Windows 10 Unattended install media – Part 2: Answer file for Windows Setup


Installing Windows 10 is done in three phases:

  1. Boot from install media, run Windows Setup (when done, restart is required)
  2. Configure hardware devices (one restart during, one restart when done)
  3. Windows Welcome (OOBE)

 

In normal clean install, user interaction is required in phases 1 and 3, phase 2 being run automatically without user interaction. In phase 1 user selects language and keyboard layout settings for setup process and system accounts, enters product key for specific edition or selects edition manually and accepts license if product key is not entered at this stage, and selects disk and partition to install Windows. When phase 1 is done, Windows restarts to phase 2 which is done without user interaction and when ready automatically restarts to phase 3.

In phase 3 user selects region and language settings for user accounts, creates initial admin user account, chooses OneDrive, privacy and other account settings and finally boots to desktop.

To fully automate Windows 10 installation, to create install media for a “hands free” Boot & Forget installation, we need to prepare so called answer files for both Windows Setup (phase 1) and Windows Welcome (OOBE, phase 3). Read Understanding Answer Files on Microsoft Docs, an old but still valid article to explain what answer files are and what they do.

In this post we will create an answer file called autounattend.xml which, when added to root of install media (ISO, USB, DVD) will take care of Windows system accounts region and keyboard selection, accepts license, wipes the hard disk clean, re-partitions it as user prefers, and finally starts Windows Setup. This post is quite long and might look as complicated if you have never done this, but let me assure you the procedure is fast and easy. I just wanted to make instructions clear enough for anyone to follow. I usually need about three minutes to do everything what’s told in this post, to create autounattend.xml answer file (timed it now to be sure!)

Windows SIM (System Image Manager)

WSIM is part of Windows 10 ADK (Assesment and Deployment Kit). To start creating answer files, download the latest WADK: https://docs.microsoft.com/en-us/windows-hardware/get-started/adk-install

If you are working with Windows Insider builds, download WADK Insider Preview instead: https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewADK

You can of course install each and every component of WADK if you so prefer, but to create answer files and custom ISO images, we will only need Deployment Tools:

When installed, you can find WSIM in Start > W > Windows Kits > Windows System Image Manager.

Launch WSIM. The GUI has five panels:

  1. Distribution Share
  2. Windows Image
  3. Answer File
  4. Properties
  5. Messages

 

In this example, we will work with panes 2 through 5. To start with, we need to create a catalog file.  A catalog file with extension .clg is a binary file, containing the settings for a specific Windows edition. Catalog files are not required to install Windows, but they are essential when creating an answer file. A catalog file can be created using a Windows 10 install.wim file.

To create a catalog file, copy install.wim file from a valid Windows 10 install media to hard disk or a USB flash drive (catalog file cannot be created from write protected WIM file). Select File > New Answer File, Click Yes and browse to the install.wim file:

To start creating a new catalog file, click Yes:

WSIM will now create a catalog file. Note that this will take some time, on my ancient Asus i5 laptop it takes around 15 minutes, on a bit younger HP laptop almost 10 minutes. If using WADK / WSIM Insider Preview, notice that a minor bug might cause you seeing this:

The catalog file was created, whatever the error message says. Just click Continue and repeat the process selecting File > New Answer File, and this time browsing to and selecting the catalog file instead of WIM file:

 

Catalog files are created in same folder where the original install.wim file is locatedd. They are reusable, you only need to create catalog file once, to work with additional answer files you can simply select the catalog file instead of creating a new one from a WIM file.

Add components to autounattend.xml answer file

On Windows Image pane bottom left, expand Components. Right click Microsoft-Windows-International-Core-WinPE, add it to configuration Pass 1 WindowsPE:

Next, expand Microsoft-Windows-Setup on Windows Image pane. Add component DiskConfiguration to Pass 1 by right clicking DiskConfiguration and selecting Add Setting to Pass 1, expand ImageInstall > OSImage component and add InstallTo to Pass 1, add UserData domponent to Pass 1:

The Answer File pane at top middle should now look like this when all components have been expanded:

Regional and language settings

Let’s first add Windows UI (display) language, installation language and keyboard layout. Select Microsoft-Windows-International-Core-WinPE on Answer File pane, edit properties as preferred on Properties pane top right. In my case I want to install UK English Windows 10, using Finnish keyboard layout (input language) which allows me to type in both my native languages Finnish and Swedish, as well as in English and German which I also need on daily basis:

InputLocale value for a Finnish keyboard is 040b:0000040b, everything else is set to UK English (SystemLocale, UILanguage, UILanguageFallback, UserLocale). Here’s a short list of some other InputLocale and language codes:

  • 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

 

For a complete list of such information, please visit: Default Input Profiles (Input Locales) in Windows

About UILanguageFallback: it is the language used for resources, notifications and system messages that are not localized (translated) into the current Windows system language. US English (en-US) can be used as a Fallback language in every language version of Windows, and should be used for all partially localized versions. Arabic (ar-SA) and Chinese Hong Kong (zh-HK) are exceptions. In addition to en-US in Arabic, the fallback language can also be French (fr-FR) and in Chinese, it can also be Hong Kong Chinese Taiwan (zh-TW).

OK, out next step is to tell Windows Setup the language for the install media. Expand Microsoft-Windows-International-Core-WinPE in the Answer File pane, then select SetupUILanguage, and set properties for the UILanguage as you like. In my case, after installing UK English Windows 10, I set it to EN-GB, where the first two letters identify the language, and the last two identify its regional version:

Notice that Microsoft has elected to show languages as xx-YY where lower case xx is the language and upper case YY is the region. However, this value is not case sensitive. Thus, even something such as eN-gB would be accepted and would work OK. I am used to using upper-case letters for both parts of the language ID myself. You can do as you like!

Partitioning the hard disk

Right click DiskConfiguration under Microsoft-Windows-Setup in the Answer File pane, then select Insert New Disk:

Next, select the new disk in the Answer File pane, and edit its properties. DiskID tells Windows Setup which disk to use to install Windows, where DiskID 0 is the primary hard disk (DiskID 1 = second HDD, and so on). Setting the WillWipeDisk value to TRUE tells setup to wipe the disk. This is the same as executing a DISKPART > SEL DISK 0 > CLEAN operation:

Now, onto the disk partitions. Creating install media for a GPT partitioned / UEFI system, we need to create four partitions (WinRE, EFI, MSR, Windows). For an MBR / BIOS system, we create only two partitions (System Reserved, Windows). Right-click CreatePartitions, then select  Insert New CreatePartition:

Repeat this step to create four partitions for GPT / UEFI install media or two partitions for MBR / BIOS install media.

This only creates these partitions. To tell Windows Setup what each partition is and how it should be setup and formatted, we must add ModifyPartition to each partition added above. Right click Modify Partitions in the Answer File pane and select Insert New ModifyPartition:

Repeat this step until you have one ModifyPartition for each CreatePartition.

Now, one by one, select a CreatePartition on Answer File pane and edit its properties as shown in the following table:

GPT Partitions

 

Here’s a screenshot from my system, that shows how you should edit properties for the first partition on  GPT / UEFI install media:

 

To edit CreatePartition values for an MBR disk:

MBR partitions

The value Extend = TRUE for partition 4 (GPT disk) or partition 2 (MBR disk) (the Windows partition), tells the system to use all available space on the hard disk for a single Windows partition after all the other necessary system partitions have been created. Should you wish to create additional data partitions, you’ll need to set a specific size for the Windows partition and then add additional partitions (now or later). Only the last/rightmost partition can be set to to extend.

Next, we need to edit ModifyPartition properties for each CreatePartition as shown in the following table:

GPT partition properties

Notice that the small 16 MB Partition 3 (GPT disk), MSR or Microsoft Reserved Partition is neither formatted nor labeled. Here’s a screenshot of an example  ModifyPartition, showing properties for the WinRE partition:

ModifyPartition values for MBR disk:

MBR partition properties

Notice that when setting up an MBR disk, one more property is required make that partition active. This should be partition 1, the System Reserved partition.

To create more partitions, just create additional data partitions setting the EXTEND value for that Windows partition to FALSE, and assign it a specific size. Only the last partition on a disk can be set to EXTEND = TRUE, to use all available space left after creating other partitions.

Here’s an example using the answer file for a GPT disk. We want to create a 128 GB (131,072 MB) Windows partition, a 200 GB (204,800) Data partition, and then use the rest of the HDD for a Games partition. In that case, we would need to create six CreatePartitions and six ModifyPartitions and set properties for each one as follows:

GPT partitions (additional Data partitions)

ModifyPartition values for those six partitions would then be as shown in the next table:

GPT partition properties (additional partitions)

PLEASE NOTICE: The above table GPT partition properties (additional partitions) might not show correctly if using any other browser than Edge or Chrome. While I am inspecting this, in case table values are not shown, click here to view it as an image in new tab.

It is important to understand and remember that for each partition, we need one CreatePartition to create the partition, and one ModifyPartition to set its properties:

The last part of partitioning is to tell Windows Setup where to install Windows. Expand Microsoft-Windows-Setup > ImageInstall > OSImage in the Answer File pane, then select InstallTo. Set its properties: DiskID = 0 (if installing to the primary hard disk), PartitionID = 4 (GPT / UEFI) or PartitionID = 2 (MBR / BIOS):

User Data & Product Key

Here’s how to set the Microsoft-Windows-Setup > UserData  properties: AcceptEula = TRUE, FullName = Any name (optional, can be left empty), Organization = Any name (optional, can be left empty):

The last thing an answer file needs is a product key. You can use any volume licensing key if one is available, or simply a generic key. If you use a generic key, Windows will be automatically activated when installed if the machine has a valid, existing digital license for that specific Windows 10 edition. If not, activation must be peformed manually with a valid product key sometime after installation is completed.

Expand Microsoft-Windows-Setup > UserData, select ProductKey. Enter a key:

Here are some generic product keys you can use in an autounattend.xml answer file:

  • Windows 10 Home Single Language: 7HNRX-D7KGG-3K4RQ-4WPJ4-YTDFH
  • Windows 10 Home: TX9XD-98N7V-6WMQ6-BX7FG-H8Q99
  • Windows 10 Pro: VK7JG-NPHTM-C97JM-9MPGT-3V66T

 

For Education, Enterprise and Server editions, please see this Microsoft Docs support article for generic install keys: Client Setup Keys

Note that generic keys may only be used for installation. Windows 10 cannot be activated with a generic key.

OK, now the answer file is ready. Next, you must validate it to see if it contains any errors:

Check the Messages pane at the bottom middle. If there are no warnings, save your answer file as autounattend.xml (File > Save As).

That’s it! When this answer file is stored at the root of the Windows 10 install media, Windows Setup needs no user interaction. It partitions the hard disk and installs Windows as instructed in autounattend.xml.

In next part of this series we will create an answer file to automate the Windows Welcome (OOBE). Stay tuned!

Links to all five parts:

 

Kari

 

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.

5 Responses “Windows 10 Unattended install media – Part 2: Answer file for Windows Setup”

  1. x0tester0x
    August 8, 2018 at 11:44

    Can you also add a Recovery Partition(with a Recovery Image to Recover Windows) to the Image?

  2. August 9, 2018 at 02:16

    Yes.

    However, how I do it is I use the custom WIM file captured in Part 5 of this series to create “factory” recovery partitions on each machine the image will be deployed, as told in this post: https://win10.guru/create-a-custom-windows-10-factory-recovery-partition/

  3. Just-a-hack
    August 28, 2018 at 14:39

    Great Job and well written! Exactly what I was looking for

  4. Mike
    October 17, 2018 at 16:28

    Can I get some clarification here? So if I understand correctly. We extract the .wim from the .iso and use that to create our catalog file. Once the catalog file is created, we can delete the .wim we extracted and use the catalog file for our answer files. After we’ve created our autounattend.xml and unattend.xml, we store those to the same location as the .iso which we extracted the .wim file from. When we mount the .iso, it will use the answer files, correct?

  5. October 17, 2018 at 21:53

    The catalog file is required to create an answer file in Windows System Image Manager . As it needs to be created from a valid install.wim file which can’t be write protected, we need to copy it first from ISO to hard disk to be able to use it. When catalog file is created, that copy of install.wim on hard disk can be deleted if you have no other use for it. Catalog file created from it can then be reused on other answer file projects.

    How and where the both answer files will be used will be explained in last, fifth part of this series. Please read all parts. Answer file unattend.xml will be stored in C:\Windows\System32\Sysprep folder before you sysprep the reference installation and capture the Windows image to custom install.wim file. The other answer file, autounattend.xml will then be stored on the root of the new custom ISO file you will create.

    All this about how to use answer files will be explained in Part 5: Sysprep & Capture Image

    Kari

Leave a Reply

%d bloggers like this: