XMLtoE2B.exe utility - Version 2  (Win7/8/8.1/10)

You do not need to install the bloatware Microsoft SDK or ADK, just to create an XML file! There is a much easier way using WAFG+XMLtoE2B!
The Windows utility, XMLtoE2B.exe will convert a basic XML file that has been generated by the Windows Answer File Generator, to an XML answer file that is suitable for use with Easy2Boot (or any Windows install, even if you are not using E2B). If you find the WAFG website useful, please make a donation using the Contact link on the WAFG site.
XMLtoE 2B makes creating automated, fully unattended answer files really easy!
New! E2B eBooks are now available (including a complete course on making a multiboot USB drive and an eBook on Installing Windows).
If you have donated £10 or more (or have helped with the development of E2B), please contact me for a licence file to make XMLtoE2B fully functional - or you can edit your XML file manually by following my blog post here.

Quick Instructions

Run XMLtoE2B.exe utility (a Licence.bin file is required for full functionality)

  1. Go to the correct page on the AFG website by clicking one of the seven AFG buttons in XMLtoE2B.
    Fill in the web form and then save to an XML file (you can change the Product Key, ComputerName and disk configuration, etc. later).
    Note: If you change 'Install toDisk = 0' to different number, you must check that the 'WillWipeDisk' section also uses the same disk number or else disk 0 will be wiped!
  2. Load the AFG XML file into XMLtoE2B.exe. You must use an original WAFG-generated file - not a modified file.
  3. Add the WIM file image number - this is required for automated installation if you have a multiple-image ISO file such as the Install.wim file on Retail ISOs.
    Change the other fields as required. You can either use a generic install key or an Activation key if you have one.
  4. Click on 'Convert file' - this converts the file that was loaded into memory in Step 2 into an XML file for E2B.
    (optional) Edit the text in the 'Results' window if required - e.g. you can change the comment field or change any other setting.
  5. Save the XML file to the E2B USB drive using the 'Save text from Results window to a file' button or view the file in NotePad. 
The E2B \AutoUnattend.xml file must be at least 100K in size and is erased and updated by E2B when you boot to the Main menu. It must be as large as your largest XML file (so 100K should be large enough!).
XMLtoE2B is for E2B v.1.67 and later versions (earlier versions of E2B will only work correctly if you tick 'Prompt user for Repair').

To examine XML files, you may find the Microsoft utility XML Notepad 2007 helpful.



1 Generate XML file using Windows AFG - use one of the buttons to launch the correct WAFG page and create a WAFG XML file.
2 Load WAFG XML file - Loads the file that was generated by the Windows AFG web utility. Only use original WAFG files (not modified or non-WAFG generated files).
3 WIM file image number - If your ISO contains a \Sources\Install.wim (or .esd) file containing multiple Editions of Windows (e.g. Core + Pro), Setup will not know which image to use. Setting an incorrect image number can result in you being prompted to choose an Edition if the image number is not consistent with the Product Key you have used (e.g. Index=6 + Windows 10 PROFESSIONAL Product Key). 
Note: Single Language versions of Win8/10 usually contain a single image - Home/Core only (image #1).
More recent Microsoft Win10 Download ISOs with Install.ESD files contain the following images:
1 Cloud
2 CloudN
3 Core
4 CoreN
5 CoreSingleLanguage
6 Education
7 EducationN
8 Professional
9 ProfessionalN
1               Cloud
2               CloudN
2 or 3        Core
2 or 4        CoreN
3 or 5        CoreSingleLanguage
4 or 6        Education
5 or 7        EducationN
1 or 6 or 8 Professional
7 or 9        ProfessionalN
Tip: You can use WinToUSB to list the available editions inside an .ISO file and their index numbers.
If you always want to be prompted before installation begins automatically, use an invalid image number - e.g. 20.
Get Image Info - The very large Install.WIM or Install.ESD file inside a Windows Install ISO usually contains multiple Windows Editions. Click to see typical image numbers and then click OK to get the image information XML file from a .WIM or .ESD file. This large file is usually called \Sources\Install.wim or Install.esd and will need to be extracted from the Windows Install ISO file first. Alternatively, you can use 7zip to open the [1].xml file which can be found inside the large \sources\install.wim\esd file.
UserName - Set the user account name here - e.g. 'Joe Bloggs' (if left blank a username of Administrator will be used and the Administrator account will be made active). The FullName, DisplayName and RegisteredOwner fields in the new XML file are always set to the UserName value.
Password - set a password for the account (can leave this blank if no password is required). PlainText passwords (unencrypted) should be used.
ComputerName - 15 characters or less (avoid 'special' characters and no spaces allowed). Leave empty or use * if you want a random name to be chosen.
Prompt user for Computer Name - Setup will prompt the user to enter in his/her own ComputerName near the end of the build (Win7/8 only). SkipMachineOOBE must be set to false in order to get the user prompt to be visible. This option NOT SUPPORTED BY WINDOWS 10 which will choose a random computer name if no name is specified.
Product Key (5x5) - If the WAFG XML file contained a product key, it will be displayed here. You can change it before converting the file. It must be a valid key and should match the WIM file image index number (i.e. if a PRO Edition is chosen, use a PRO product key). If a Volume Licence Edition of Windows is used, then use a generic volume licence key.
Tip: If the 5x5 ProductKey in the XML file starts with the six characters ASKME- then E2B will prompt you for a new Product Key (.ISO booting only, not .imgPTN files).
Find a generic install Key - This takes you to the WAFG Keys web page that lists common generic install keys. These keys will NOT activate - they are just for installation purposes. If you click on Yes a Retail Windows 10 Pro key will be set as the Product Key.
Hide WiFi setup - The user will not be prompted to configure the Wireless network settings (SkipMachineOOBE should be unticked if you want the user to set up WiFi).
Administrator account only - The User Account(s) will be removed from the XML file and SkipMachineOOBE will be set to true (otherwise you would be prompted to create a User Account at the end of the build). The password field will be used as the Administrator password. The Auto - LogonCount is set to 5.
Prompt user for Account Name - The Administrator account is disabled and the user will be prompted to create a user account and choose a name and password.  The (disabled) Administrator password is set to whatever is in the password field. SkipMachineOOBE is set to false.
SkipMachineOOBE - You can tick this to skip the final end-user OOBE questions (if any) which occur at the end of the Setup process. Incorrect or unanswered questions will use the Windows default setting. Only tick this after doing a test run with it unticked to ensure that all your options are answered as expected.
Change Disk Partitioning - You can replace the disk configuration settings in the WAFG XML file with one of these two options.
    Single MBR Partition - For MBR installs, WAFG generates an XML file which comprises of two partitions, a 100MB hidden System Reserved partition and a second partition of maximum size. If you tick this box, only a single partition will be created as drive C: and the OS and boot files will be installed to it.
          Wipe Disk - Disk to completely erase
Size  (MB) - MAX = maximum size to fill disk, or enter for example 50000 for a 50,000MB partition. Only used if Single MBR Partition is selected.
Windows Volume Label - You can change the volume label of the single MBR partition here. Only works if 'Single MBR Partition' is selected.
    Use Disk Config file - If ticked, the contents of a text file containing DiskConfiguration and ImageInstall sections will be used. This allows GPT and other partitions to be created for UEFI installs, etc.
Browse - Browse for a DiskConfiguration file (some examples are included in the XMLtoE2B download).
Disk Config file (*.diskcfg) - Shows the .diskcfg file that will be used to replace the DiskConfiguration and ImageInstall sections.
If WillWipeDisk is set to 'false' in the XML file, then the target disk must be 'clean' (i.e. unpartitioned) for an automated install to begin. If the disk already contains partitions then the install will abort and the target disk will not be altered.
Use CHOOSE_DISK (no wipe).diskcfg if you want to delete, create and format partitions manually first.
Add LOADISO code - If you are booting using a USB Removable Flash drive from ISO (or a USB HDD + WinHelper Removable Flash drive), you need to tick this box. If you are going to use the XML file with a .imgPTN image, you do not have to tick the box (if you leave it ticked, Setup will just briefly flash up a console window and then it will quickly disappear.)
+ prompt user for repair - If this is ticked then \_ISO\e2b\firadisk\LOADISO.CMD will be used to load the ISO as a virtual DVD and it will ask if you want to repair the Hard Disk before installing Windows. If it is unticked, then \_ISO\e2b\firadisk\LOADISONP.cmd will be used to load the ISO and it will not prompt you to Repair the drive (i.e. it will immediately wipe and format the hard disk with no prompts whatsoever). The console repair menu may not work on Win8/10, so this is only useful for Win7 XML files.
SDI_CHOCO config name (for ISO files) - Specify the SDI_CHOCO configuration name (and folder). The default one included with E2B is 'SDI_CHOCO', but you can create other configurations.
Add SDI_CHOCO (for .imgPTN files) - This adds the lines into the XML file to call \e2b\stage1.cmd file. The configuration name is set in \e2b\stage2.cmd and by default it is 'SDI_CHOCO'. If you want to use a different configuration file then you must edit \e2b\stage2.cmd yourself after switching to the .imgPTN file.
Convert file - Converts the contents of the WAFG file that was already loaded into memory in Step 2 and displays the result in the Results window.
Convert to 32-bit (x86) - If the WAFG XML file is 64-bit only, this allows you to convert the output to 32-bit (x86).
Save text from Results window to a file - You can edit the text in the Results window before saving it as a file. Any existing file of the same name will be overwritten. (Disabled if no valid licence file is found)
Copy Results window to NotePad - Creates a XMLTemp.txt file and opens it in NotePad. You can then edit it and save it with a different filename if you wish. This is useful checking the results before saving to a file. (Disabled if no licence file is found)

Reference for Unattended settings



A blank ComputerName  (or '*') will result in Windows Setup making a random name up for you.
Win10: When ComputerName=* the final Computer name is made from up to the first 7 characters of followed by - and 7 random characters , e.g.
Result >>> Computer name is set to UF552E2-N42R1CJ

Product Key

The Product Key is specified in both the WindowsPE pass (which determines which Edition is to be installed, together with the WIM file Image number) and the Specialize pass (which is used when Windows is Activated). The two keys do not need to be the same. For instance, a KMS key may be used for the WindowsPE pass and a MAK key can be used for the Specialize Activation key. If no Specialize key is specified, the WindowsPE key will be used for Activation.

Notes for Windows AFG

User Accounts - You must either add a User Account or set the AutoLogon account name to 'Administrator' (which enables the Administrator account that is normally disabled). If neither is done and SkipMachineOOBE is set to false, the user will be prompted to add a User Account near the end of the build.
For Windows 10 - If no User Name is set and autologon is disabled you will get a 'Windows could not complete the installation' error near the end of installation if SkipMachineOOBE is true. If you want to also enable the Administrtaor account, use a .cmd script NET USER command after installation (e.g. using SDI_CHOCO - Startup.cmd).
SkipMachineOOBE - This should normally be set to 'false'. All testing should be done using 'false'. Once it is working correctly, setting it to 'true' may suppress some user prompts if you did not add an 'answer' into the XML file, but you will need to carefully check that the desired defaults are correct.
The best way for Windows 10 is to untick SkipMachineOOBE and ensure the XML file contains all the correct settings in the oobeSystem pass - see he re for more details on SkipMachineOOBE.
(Win7/8) Note that there is a 'catch 22' situation - if you want to be prompted for a ComputerName at the end of the build then SkipMachineOOBE=unticked=false, however if you want to enable the Admin account and have no other user accounts created, then SkipMachineOOBE=ticked=true (otherwise the user will be prompted to create an account). 
You cannot be prompted to enter a ComputerName and enable the Administrator and have no prompt to create a new User Account.
Setting the AutoLogon account name to 'Administrator' (with AutoLogon ena will enable the Administrator account.
AutoLogon=Administrator + SkipMachineOOBE=false + Add User Account will work. To do this you must create the WAFG XML file with a User Account name, Prompt user for ComputerName=ticked (SkipMachineOOB=unticked) - then after clicking Convert loaded file, edit the Results window and set the AutoLogon UserName to 'Administrator'.
In all versions of Windows the account creation phase during OOBE is skipped when at least one user account is created through the UserAccounts section of the same unattend file. 
'In Windows 10, if you enable AutoLogon, the OS will skip the user account creation phase during OOBE. This is a change from previous versions of Windows. This change only applies when no user account is created by unattend such as when setting AutoLogon for a built-in or existing account like Administrator or Guest. Microsoft recommends using unattend to create at least one user account in the Administrators group to ensure that the device can be managed after the autologon is complete. Make sure AutoLogon is disabled on computers that are delivered to customers. See here and How to Enable and Disable the Built-in Administrator Account for more information.'
If you want the Administrator account to be enabled, then use SDI_CHOCO and add a NET USER command to the MyStartup.cmd script (e.g. net user Administrator newpassword /active:yes ).

SDI_CHOCO (run a batch file)

If you want to use the SDI_CHOCO feature (e.g. to run any batch file during the Specialize or OOBE pass), you must add some more lines into the XML file using the checkboxes provided.
If you want to use SDI_CHOCO with a UEFI installation, you must tick the 'Add SDI_CHOCO (for .imgPTN files)' checkbox. This ensures that \e2b\stage1.cmd is called. However, note that the configuration name is set in \e2b\stage2.cmd, so you must also edit stage2.cmd if you want to use a different SDI_CHOCO configuration set.

How to use the new XML file

If you have a Removable E2B USB Flash drive
  1. For ISO booting, just copy the XML file to the correct Windows folder (e.g. \_ISO\WINDOWS\WIN8 for Windows 8 and 8.1).
    Give the XML file a suitable name (e.g. Win8.1Pro_AutoWipe_User1_max.xml. (MBR systems only).
  2. For a FAT32 Windows Install .imgPTN file, switch to the .imgPTN file's CSM menu and then quit (F10) or remove the USB drive - then re-insert the E2B drive and copy the XML file to the root of the image partition (not the E2B partition which contains the \_ISO folder!) and name it \AutoUnattend.xml. (MBR and UEFI systems). If MBR-booting, press F7 to boot from the hard disk after the first reboot by Setup (or set the default menu option to the F7 menu entry).
If you have a Fixed-Disk type of E2B USB drive (e.g. USB-HDD)
  1. For ISO booting, use a 'Helper' Removable USB Flash drive with the E2B drive and follow step 1 above. (MBR systems only)
  2. For a FAT32 Windows Install .imgPTN file, switch to the .imgPTN file's CSM menu and then quit (F10) or remove the USB drive - then re-insert the E2B drive, mount the \Sources\boot.wim image #2 file using GImageX and copy the XML file to the mounted folder and name it \AutoUnattend.xml.  See here for more information. (MBR and UEFI systems). WARNING: If you UEFI-boot and the XML file auto-partitions the target drive, then any system that you boot to will automatically get it's hard disk wiped! Take care when UEFI-booting from the USB drive in this state! If you boot to it on your office system, it will wipe the hard disk!
  3. .imgPTN + Windows 10 only - recent Windows 10 versions will use a \AutoUnattend.xml file if the root of the FAT32 .imgPTN image. So simply copy the AutoUnattend.xml file to the root of the E2B drive after it has been 'switched' in.
WARNING: If the XML file installs to Drive 0, then do not use it with a Virtual Machine (e.g. Virtual Box) unless the target virtual disk is Drive 0. If the E2B USB drive is drive 0 it will be wiped! You must use the Fixed-Disk #2 method but also modify the DiskID value inside the XML file before use. See here for more information.
Use 'CHOOSE_DISK (no wipe).diskcfg' as a disk config file if you don't want any disks to be wiped and formatted automatically.


If you are prompted to first select a Locale, etc. - check that the Locale and Language settings under the settings pass="windowsPE" section and other sections are correct. WAFG does not always set this correctly. For instance, if you have an English UK ISO version, the Locale and Language settings must be for the UK, i.e. set en-GB and not en-US (in both amd86 and x86 sections of "Microsoft-Windows-International-Core-WinPE").
If the XML file does not seem to run, check the X:\Windows\Setupact.log file to see if Setup found an AutoUnattend.xml file, then check the X:\Windows\Panther\Setupact.log to see how it interpreted the settings in the XML file. If there is a failure after rebooting, check the C:\Windows\Panther\Setupact.log file and other log files as detailed here. The Setuperr.log file in the same folder will often point you to the problem.
If the oobeSystem stage fails, check the C:\Windows\Panthe\UnattendGC folder.
If the XML file seems to be ignored by Setup - check it for syntax errors.
If Setup stops with an error message about not being able to set an Active partition - you are probably trying to create an MBR type disk whilst booting via UEFI. If you want to create an MBR disk you must boot in MBR-mode.
If Setup stops with an error message about 'the selected disk is of the GPT partition style' - you are probably trying to create a GPT disk whilst booting via MBR. If you want to create a GPT (UEFI) disk, you must boot in UEFI-mode.
If you think there is a bug in XMLtoE2B - please report it and send me the three debug*.* files immediately after generating the XML file.

Change the ComputerName and UserName each time (MBR-booting from .ISO file only)

It is possible to prompt the user for a ComputerName and UserName before you start the install, and then E2B will modify the XML file before Setup begins.

See here for details and also see the WIN10_Prompt_for_PCNAME_and_UNAME.mnu file in the \_ISO\docs\Sample mnu Files\Windows folder.

See also WIN10_Prompt_for_UNAME_auto_serial_COMPNAME.mnu for a method of setting the ComputerName to contain the Serial Number of the system.

The Sample Mnu file WIN10_Prompt_User_for_XML_settings.mnu prompts the user for various XML settings and then modifies the XML file before it is used. This allows you to use the same XML file each time, but specify the UserName, ComputerName, FullName, RegisteredOwner, RegisteredOrganization, etc. before you start each build (E2B v1.A1+).