Guide π
This guide explains how to capture a custom Windows image from a reference PC, prepare the installer files, and create a bootable ISO image.
1. Requirements β
- Know how to access the BIOS settings of the target PC βοΈ
- Two USB sticks (of at least 16 GB) πΎπΎ
- A sheet of paper π
- A pen ποΈ
- Rufus tool:
choco install rufus- Rufus
- Windows installation image:
2. Flash the Windows 11 image to the USB stick πΏβ‘οΈπΎ
- Connect the first USB stick to the PC π
- Open Rufus π
- Select the correct USB stick
- Select the Windows 11 ISO
-
Set the correct BIOS/boot partition format
If the target PC uses UEFI, the partition table must be GPT.
- Check that the file system is NTFS
- Other options that you can set for the Windows ISO image:
3. Prepare the target PC π₯οΈ
- Turn off the target PC (if it is on)
- Connect both USB sticks πΎπΎ
- Turn on the PC and enter the BIOS βοΈ
-
Set the first USB stick as the boot device
At the end of the guide, it may be necessary to set Windows Boot Manager as the default boot option π
4. Steps inside the Windows installer πͺ
- Press Shift + F10 to open Command Prompt (cmd) β¨οΈ
-
Type the following command and press Enter to open the partition tool:
diskpart -
Inside
diskpart, list all storage volumes:list volWrite down the output (for example on the sheet of paper) for the next steps π
-
Exit
diskpart:exit -
Now type the following command (all on one line), customizing the values in angle brackets
<...>:dism /capture-image /imagefile:<drive_letter_of_second_USB>:\install.wim /capturedir:<drive_letter_where_Windows_is_installed>:\ /scratchdir:<same_drive_as_imagefile>:\ /name:<image_name_without_spaces> /compress:maximum /checkintegrity /verify /bootable<drive_letter_of_second_USB>β the drive letter of the second USB stick (use the notes fromlist vol)<drive_letter_where_Windows_is_installed>β the drive letter where Windows is installed (for exampleC)<same_drive_as_imagefile>β usually the same as<drive_letter_of_second_USB><image_name_without_spaces>β the name you want to give to the image (no spaces)
-
At the end of the process, you can turn off the PC by typing:
and pressing Enter π΄
wpeutil shutdown - The system image will be saved on the second USB stick with the name you chose! ππΎ
5. Prepare the ISO content π
- Connect both USB sticks to the working PC πΎπ»
-
Create a working directory on the PC (for example:
C:\WinISO_Workdir) π - Copy all the content from the Windows installer USB stick into the working directory.
-
In the working directory, go to the
sourcesfolder and replace the existinginstall.wimfile with theinstall.wimfrom the second USB stick (the one created withdism).-
Original file path:
<working_directory>\sources\install.wim -
New file path (from second USB):
<second_USB_drive_letter>:\install.wim
-
Original file path:
6. Create the ISO image πΏ
-
Install the Windows ADK (Assessment and Deployment Kit):
-
Using Chocolatey:
choco install windows-adk - Or by using the official installer: Windows ADK installer
-
Using Chocolatey:
- Open Deployment and Imaging Tools Environment as Administrator.
-
Once you are inside the working directory, run the following command (all on one line),
replacing the values in
<...>with your paths:oscdimg.exe -m -o -u2 -udfver102 -bootdata:2#p0,e,b<Source Path>\boot\etfsboot.com#pEF,e,b<Source Path>\efi\microsoft\boot\efisys.bin <Source Path> <Saving path and name of file>Where:
-
<Source Path>β the full path of the working directory (for exampleC:\WinISO_Workdir) -
<Saving path and name of file>β the full path and file name of the ISO you want to create (for exampleD:\ISOs\Custom_Windows11.iso)
-
-
When the command finishes successfully, your custom ISO image will be available at:
<Saving path and name of file>ππΎ