Windows image creation

Image build (Win 10)

Prerequisites

  • Windows 10 generic iso
  • Enough space disk (~ 20Go for a dynamic size disk on VM)
  • A windows computer available, needed for the various tools from Windows ADK (Windows System Image Manager, Windows Deployment and Imaging Tools)

Walkthrough

Image preparation

Install Windows as usual. When the computer reboot, at the first prompt press CTRL + SHIFT + F3 The computer will run in audit mode. There will be a prompt from sysprep, don’t touch it right now.

There, install all your software and configure all the necessary items.

Next, we will prepare a separate partition to store Windows image.

At the end of this phase, go back to the sysprep prompt, select Enter OOBE mode, check generalize and select the shutdown option.

Image creation

Insert Windows installation disk, boot the computer on it. At the first prompt, press CTRL + F10, it will display a command prompt.

launch diskpart, type list vol to find each partition letter.

You should remember them for the next step.

Quit diskpart, and use DISM to create the image with:

dism /capture-image /imagefile:C:\Image\install.wim /capturedir:C:\ /ScratchDir:C:\Scratch /name:"Win10" /description:"My Custom Win10 Image" /compress:maximum /checkintegrity /verify Where imagefile is the new image destination, ScratchDir the temp folder, usualy at the same location as the image and capturedir the windows install drive.

ISO preparation

Extract all the files locates in the original Windows install Iso inside a folder, and copy the generated install.wim file inside <your windows iso folder>/sources and overwrite the file.

Response file (unattend.xml)

To create the unattend file, we must use “Windows System Image Manager”. We must create a response file template by opening the generated install.wim.

source1, Image creation source2, Image + response file source3, Response file