TOOL: Windows Setup AIO Builder for 7-10 with install.wim / install.esd

George King

Active Member
Windows Setup AIO Builder for 7-10 with install.wim / install.esd


I decided to write CMD script that can build 32-bit + 64-bit ISO with all important things workable
Windows recovery option 32bit + 64bit
Clean setup
Upgrade
Autounattend
Universal $OEM$ folder
There are also added new things!
  1. Dynamic drivers folder support
  2. Autounattend file selector
These both new features are also part of Autorun.dll patcher where you can find more informations how it works!


This method is universal and work for all languages. I tested it with Windows 7/8.1/10 (1507-20H2).

Trick is in HEX editing files to keep this solution alive - autorun.dll, setup32.exe, setup64.exe, bootfix.bin and adding new files setup.cmd, skiprecovery.xml and autounattend.xml

You can also build true Windows 7 with install.esd support with this tool!


How to build your own AIO ISO

1) Download and extract this tool
2) Run BuildAIO.cmd /? from cmd to see help
2.PNG

3) Build your own Windows 7/8.1/10 with install.esd
Example to get Windows 7 SP1 en-US AIO with Windows 10 2004 Setup Engine​

BuildAIO.cmd "D:\Win7\x86" "D:\Win7\x64" "Windows Setup" "Windows Memory Diagnostic" ESD "D:\Win10\x86" "D:\Win10\x64"

3.png
Result is 2,9 GB ISO with 9 different editions with single install.esd
1.PNG


When booting you can easily select setup architecture (on 32bit CPU use x86)​

4.PNG

Run Installation or Windows Recovery mode if you need - disabled by default using skiprecovery.xml
Delete or rename this file in your ISO to get Repair your computer option.
Button Install now run setup.cmd to launch original setup.exe with custom install.wim / install.esd and $OEM$ folder location
8.PNG
9.PNG


Simply select edition which you want to install and format HDD
5.PNG
6.PNG
7.PNG


How does this method work?

setup32.exe is patched to run autorun.dll in sourc32
setup64.exe is patched to run autorun.dll in sourc64

autorun.dll inside boot.wim\2\sources is patched to look for skiprecover.xml instead of autounattend.xml and run setup.cmd, so we can call original setup.exe with custom install.wim / install.esd and $OEM$ location for both platforms. Autounattend.xml is automaticaly used, if present.

autorun.dll inside sourc32 / sourc64 is patched to look for setup.cmd instead od setup.exe

bootfix.bin
modified boot message "Press any key to boot from CD or DVD" to "Press any key to boot from DVD or USB" to get modern look


Windows 7 with install.esd looks like original Windows 7 setup! All needed resources are rewriten with original one from .RES patches

Important notes:
1) ESD support in Windows 7 is created by grabbing sources folder from Windows 10 boot.wim so boot image is still Windows 7!
2) Autounattend works without problem
3) skiprecover.xml - skip Recovery mode
4) autounattend.xml - Accept Eula + Skip product key
5) Don't integrate updates into boot.wim after using this tool, updates should rewrite patched files. Use this tool after your NTLite sessions!
6) In x64 images Name / DisplayName / Desription / DisplayDescription attributes is added space " " to keep wimlib compress install.esd
7) bootfix.bin patching suppot now these languages: en-US, cs-CZ
If you would like to provide new boot messages support, you need to edit bootfix.bin with HEX Editor like HxD. For example you need to provide old (\x43\x44\x20\x6F\x72\x20\x44\x56\x44\x2E/) and new (\x44\x56\x44\x20\x6F\x72\x20\x55\x53\x42/) patch. For more look into this code

Code:
if "%SLLP%" == "en-US" (
    "%~dp0apps\bbe\%ARCH%\bbe.exe" -e "s/\x43\x44\x20\x6F\x72\x20\x44\x56\x44\x2E/\x44\x56\x44\x20\x6F\x72\x20\x55\x53\x42/" "%~dp0_output\boot\bootfix.bin" -o "%~dp0_output\boot\bootfix2.bin"
    del "%~dp0_output\boot\bootfix.bin"
    ren "%~dp0_output\boot\bootfix2.bin" "bootfix.bin"
)

Needed tools that are included in this pack, without them we cant build it! All credits go to application creators

WimLib - https://wimlib.net
Binary Block Editor -
http://bbe-.sourceforge.net/bbe.html
Resource Hacker - http://www.angusj.com/resourcehacker
PEChecksum - https://www.exedb.com/company/n7Epsilon
OSCDIMG - https://www.microsoft.com



Changelog
14.12.2020 - v1.1
  • Added: Dynamic drivers folder support
  • Added: Multi-Unattended files selector
  • Fixed: UEFI boot when building Windows 10 AIO
  • Fixed: System automatically reboot when you cancelled migration
31.07.2020 - v1.0.1
  • improved process for using tool as double-click on BuildAIO.cmd
31.07.2020 - v1.0
  • first public version
 
Last edited:
Well done!

I just now read this, and it looks amazing! I am not much for using the command prompt! Nerves, I guess! Is it possible to obtain a copy of the iso, to try it out on a system?
 
Well done!

I just now read this, and it looks amazing! I am not much for using the command prompt! Nerves, I guess! Is it possible to obtain a copy of the iso, to try it out on a system?
Just download it and double click on BuildAIO.cmd, you will be prompted for certain extracted ISO paths and so on. It's easy to build your own distro
 
1) ESD support in Windows 7 is created by grabbing sources folder from Windows 10 boot.wim so boot image is still Windows 7!
Just to be clear, do you mean replace the sources folder in the windows 7 boot.wim with the sources folder from the windows 10 boot.wim?
 
It seems this script requires both x86 and x64.

Is it possible to skip the x86 part entirely and create an ESD friendly setup for Windows 7 x64 only?

I'd love to see a simplified version of this script just to add the ESD support option to a Windows 7 install.wim with just one image.
 
Last edited:
Just to be clear, do you mean replace the sources folder in the windows 7 boot.wim with the sources folder from the windows 10 boot.wim?
Yes, thats true
It seems this script requires both x86 and x64.

Is it possible to skip the x86 part entirely and create an ESD friendly setup for Windows 7 x64 only?

I'd love to see a simplified version of this script just to add the ESD support option to a Windows 7 install.wim with just one image.
I'm going to prepare it soon
 
Last edited:
Awesome! I CAN'T WAIT!

I'd love to see a simple script like this:

win7toesd.cmd [path_to_win10_boot.wim] [path_to_win7_boot.wim] [optional_path_to_output_win7_boot.wim]
 
Last edited:
Does this also enable USB 3 and NVME support during Windows 7 Installation or is this just for ESD support?
 
Ah OK then, so you mean that you are going to add it to this tutorial? Thank you for this excellent tool by the way.

It will be new topic as its very huge process and mainly is designed for building 36v1 AIO single language (all 36 languages are supported). With all updates (11-2020) integrated / installed - I'm testing automated sysprep after integrating right now to see if there are any big benefits. USB3.x generic driver ported from Windows 8 and also custom NTLite session to remove uneeded languages and drivers to create updated "core" image for DriverPacks integration to keep most universal DVD / USB. Best on this process is final ISO that can fit on single layer DVD. Most boring it'c creation time, but almost everything is scripted and I'm testing it for public release soon (month, maybe two).

1607265879711.png
1607265916980.png
 
I created a windows 10 AIO image with your tool, but for some reason everytime I am trying to boot in UEFI mode it tells me "No bootfile found for UEFI. Maybe this system does not support x64 UEFI boot". Legacy boot works though. I have tried other windows 10 images on this system (not AIO, just x64 bit) and they boot successfully in UEFI. Also one strange thing I have noticed is that the Windows 7 AIO image that I have created with your tool can successfully boot in UEFI mode. Do you know what the problem could be? Thank you.
 
Last edited:
OK, I'm going to download these images to give it a try
I have just downloaded the new images from microsoft (Win10_20H2_v2_English.iso) and I integrated the newest update 19042.685. I will try to create an AIO image later and I will let you know if it works. Thanks.
 
Nope, I get the same error again. "No bootfile found for UEFI. Maybe this system does not support x64 UEFI boot". I have also tried to boot the image in VMware workstation and I get a similar error saying "No compatible bootloader found", which I guess means the same thing. If you want to reproduce the error just download the latest images and updates, that's what I did.

EDIT: I suspect that the issue has to do with the x32 bit architecture of windows 10 since it contains files (bootia32.efi) for booting in x32 UEFI, and most PCs now, cannot boot in x32 UEFI and for some reason they get confused and they don't see the x64 bit UEFI files. I tried removing the "bootia32.efi" file but I still get the error. Maybe that's why I can successfully boot the Windows 7 AIO iso (as I told you in my first post). The difference between the Win 7 AIO and Win 10 AIO images is that the windows 7 AIO image contains files for booting only in x64 UEFI whereas the windows 10 AIO image, contains files from both x32+x64 architectures.

EDIT 2: I think that problem is that you are using UEFI files from the x32 bit image as your MAIN files for the AIO image. For example, the bootmgr.efi file in the AIO image is 1.232 KB, which is the same size as the one from the WIN 10 x32 image. I think most EFI files in the AIO image are taken from the Win 10 x32 bit image. I would try to do some more testing tomorrow.

EDIT 3: I removed all x32 EFI files from the AIO and replaced them with the ones from the x64 image but I still get the error. I don't know what else to do, maybe the tool does not patch the files of the windows 10 images correctly.
 
Last edited:
In addition to my previous post, I have also detected another issue. When I try to run upgrade, I get this error:

Untitled.png
 
Last edited:
Back
Top