Skip to content

Latest commit

 

History

History
75 lines (55 loc) · 5.3 KB

cl8if7ma9004oyanv2n7c5wk9.md

File metadata and controls

75 lines (55 loc) · 5.3 KB

How to modify the Windows Setup boot image

I'm using Windows 11 *.iso, so details can be different on other versions - overall idea should be the same. This is being done for years to older images.

%%[join-cta]

Process summary

This is three-phase process.

  1. Extract ISO content.
  • Modify boot.wim image.
  • Build new bootable ISO containing the changes using external software (like ImgBurn.

ℹ It is important that we are creating the bootable media, as not any software can do that correctly.

Phase 1

  1. Prepare files you want to have access to during Windows installation process or note the files you want to change.
  • Extract the content of the *.iso Windows bootable media (ex. using 7zip).

Phase 2

To modify the content of the environment you are booted to, you have to modify the sources\boot.wim file. This can be done using built-in Deployment Image Servicing and Management tool (dism). Read more about it here.

❗ Mounting images with DISM doesn't look like regular ISO mounting. It is more similar to Unix mounting style. You won't see additional drives, files are extracted to the directory, so it can be easy to forget about unmounting the image and start removing them by hand. Be careful then - some of the files will still be protected by the Windows, but when you accidently apply the changes later, you could break your WIM file.

  1. Prepare empty directory where you will mount the image from boot.wim file.

Windows PE (WinPE) is Windows Preinstallation Environment. Read more here. You can think of this WIM file as a docker image with multiple layers. Here index 1 is the blank layer of WinPE and index 2 (or any last index) is the actual environment that is booted.

%%[support-cta]

Phase 3

  1. Start ImgBurn (or any other software able to create bootable media). ![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1663361103181/o4oyNh73j.png align="left")

ℹ During process ImgBurn will ask some questions - you can safely assume it is right and agree to changing some modes or adding labels to disc :).

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1663495261398/O0thcW5oN.png align="center")

Verify

  1. Mount the patched ISO in virtual machine (or just live machine).

Additional readings

%%[follow-cta]