XMLtoE2B.exe utility (Win7/8/8.1/10)

If you want to automate the installation of Windows 7/8/8.1/10 using E2B, you just need to add an XML answer file (see end of this page for details).
 
Note: 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 link on their site.
 
XMLtoE2B makes creating automated, fully unattended answer files really easy!
 
Note: XMLtoE2B.exe does not automatically add in the RunSynchronous 'Specialize' pass section which is required for SDI_CHOCO. You must add this section in yourself (e.g. using Notepad) - see below for more details.
 
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 the XML file manually by following my blog post he re.

Quick Instructions

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

  1. Go to the correct page on the AFG website by clicking one of the three AFG buttons in XMLtoE2B. There is also a Windows 10 page but it does not have a button.
    Fill in the web form and then save to an XML file (you can change the Product Key, ComputerName and disk configuration, etc. later)
  2. Load the AFG XML file into XMLtoE2B.exe (the file contents will be listed in the 'Results' window)
  3. Add the WIM file image number - this is required 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 loaded 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 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. 
WARNING: DO NOT OVERWRITE THE \AUTOUNATTEND.XML FILE ON THE E2B partition! 
The E2B \AutoUnattend.xml file must be at least 100K in size and is overwritten 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 use with E2B v.1.67 and later versions (earlier versions of E2B will only work correctly if you tick 'Prompt user for Repair')
 
 

Options

1 Generate XML file using Windows AFG - use one of the three buttons to launch the correct WAFG page
2 Load AFG XML file - loads a file that was generated by the Windows AFG web utility into memory.
3 Set 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 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=1 should be used with a Windows 8 or 8.1 PROFESSIONAL Product Key). Note: if you have an install.esd, you may need to use 7zip to examine the [1].XML file (load it into a browser or Word).
Get WIM Info - Click to see typical image numbers and then click OK to get XMLtoE2B to get the image information from a .WIM file. This file is usually called \Sources\Install.wim and in order for XMLtoE2B to examine it, it will need to be extracted first from the Windows Install ISO file. If the install wim file contains more than one image, you must set this index number.
PRODUCT KEY (5x5) - If the 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 number.
Generic Install Keys - This takes you to the WAFG Keys page that lists common generic install keys. These keys will NOT activate - they are just for installation purposes.
Add E2B 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 added in, 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).
SkipMachineOOBE - you can tick this to skip the final end-user OOBE questions (if any) which occur at the end of the Setup process.
No User Accounts (Administrator only) - if you tick this box then all User Accounts will be removed from the XML file and SkipMachineOOBE will be set to true (otherwise you will be prompted to create a User Account at the end of the build).
Prompt user for ComputerName - If this is ticked then Setup will prompt the user to enter in his/her own ComputerName near the end of the build. SkipMachineOOBE must be set to false in order to get the user prompt to be displayed.
ComputerName - Enter the name of the computer here - if you leave it blank then Windows Setup will generate a 'random' computer name.

           Change Disk Partitioning - You can replace the disk configuration in the original XML file with one of these two options.
 
Single MBR Partition - 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..
Size for disk partition (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.
OS Volume Label - You can change the volume label of the single partition here. Only works if 'Single MBR Partition' is selected.
 
Use Disk Config file - If ticked, the contents of a text file containing complete 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.
 
Convert loaded file - Converts the contents of the original file that was already loaded into memory in Step 2 and displays the result in the Results window.
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 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. Handy for checking the results before saving to a file. (Disabled if no licence file found)
Exit - guess!
 
 

Reference for Unattended settings

 
 

Notes

A blank ComputerName  (or '*') will result in Windows Setup making a random name up for you.
 

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 - Make sure you set a User Name or you will get a 'Windows could not complete the installation' error near the end of installation if SkipMachineOOBE is true.
 
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.
 
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' 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 (No User Accounts=unticked,  SkipMachineOOB=unticked) - then after clicking Convert loaded file, edit the Results window and set the AutoLogon UserName to 'Administrator'
 
If you want the user to be prompted to create a new User Account and you want the Administrator account enabled, then manually change SkipMachineOOBE to false before saving the Results to an XML file.
 

SDI_CHOCO (run a batch file)

If you want to use the SDI_CHOCO feature (or run any batch file during the Specialize pass), you must manually add some more lines into the Specialize pass - Microsoft-Windows-Deployment' section.
Make sure that the Order numbers are correct (1,2,3 etc) if you have more than one RunSynchronous entry.
The screenshot below shows an x86 and amd64 entry to run SDI_CHOCO.cmd during the Specialize phase.
 

How to use the XML file

 
If you have a Removable E2B USB Flash drive
  • 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).
  • 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 you have a Fixed-Disk type of E2B USB drive (or USB-HDD)
  • For ISO booting, use a 'Helper' Removable USB Flash drive with the E2B drive and follow step 1 above. (MBR systems only)
  • 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!
 
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 then 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.
 




More Info