πŸ’Ώ

Custom Windows ISO from Reference PC

Step-by-step guide

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 πŸ’Ώβž‘οΈπŸ’Ύ

  1. Connect the first USB stick to the PC πŸ”Œ
  2. Open Rufus πŸš€
  3. Select the correct USB stick
  4. Select the Windows 11 ISO
  5. Set the correct BIOS/boot partition format

    If the target PC uses UEFI, the partition table must be GPT.

  6. Check that the file system is NTFS
  7. Other options that you can set for the Windows ISO image:

3. Prepare the target PC πŸ–₯️

  1. Turn off the target PC (if it is on)
  2. Connect both USB sticks πŸ’ΎπŸ’Ύ
  3. Turn on the PC and enter the BIOS βš™οΈ
  4. 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 πŸͺŸ

  1. Press Shift + F10 to open Command Prompt (cmd) ⌨️
  2. Type the following command and press Enter to open the partition tool:
    diskpart
  3. Inside diskpart, list all storage volumes:
    list vol

    Write down the output (for example on the sheet of paper) for the next steps πŸ“

  4. Exit diskpart:
    exit
  5. 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 from list vol)
    • <drive_letter_where_Windows_is_installed> β†’ the drive letter where Windows is installed (for example C)
    • <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)
  6. At the end of the process, you can turn off the PC by typing:
    wpeutil shutdown
    and pressing Enter πŸ“΄
  7. The system image will be saved on the second USB stick with the name you chose! πŸŽ‰πŸ’Ύ

5. Prepare the ISO content πŸ“‚

  1. Connect both USB sticks to the working PC πŸ’ΎπŸ’»
  2. Create a working directory on the PC (for example: C:\WinISO_Workdir) πŸ“
  3. Copy all the content from the Windows installer USB stick into the working directory.
  4. In the working directory, go to the sources folder and replace the existing install.wim file with the install.wim from the second USB stick (the one created with dism).
    • Original file path: <working_directory>\sources\install.wim
    • New file path (from second USB): <second_USB_drive_letter>:\install.wim

6. Create the ISO image πŸ’Ώ

  1. Install the Windows ADK (Assessment and Deployment Kit):
  2. Open Deployment and Imaging Tools Environment as Administrator.
  3. 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 example C:\WinISO_Workdir)
    • <Saving path and name of file> β†’ the full path and file name of the ISO you want to create (for example D:\ISOs\Custom_Windows11.iso)
  4. When the command finishes successfully, your custom ISO image will be available at: <Saving path and name of file> πŸŽ‰πŸ’Ύ

7. Reference πŸ”—