Blog

This article explains how to create a custom installation image for Windows 10 or 11 with preinstalled applications, files, and environment settings. Typically, a clean Windows image is deployed, followed by the installation of necessary applications using automated methods (e.g., via GPO or scripts). However, there are cases where you need to deploy a ready-to-use Windows image with all required applications included.


You can purchase original Windows product keys from our catalog:

Windows 11 – from 11.20 €

Windows 10 – from 9.16 €

Preparing a Reference Windows Image with Installed Applications

The first step is to deploy a clean Windows installation on a reference computer or virtual machine.

Then, enter Audit Mode (during the OOBE phase, when prompted to select regional settings, press CTRL + SHIFT + F3).

After the desktop appears, minimize the sysprep utility window (do not close it) and begin installing applications, updates, and configuring desired Windows settings.

In this example, we use the WinGet package manager to install applications:

winget install --id=7zip.7zip -e

winget install --id=Notepad++.Notepad++ -e

winget install --id=VideoLAN.VLC -e

winget install --id=WinDirStat.WinDirStat -e

winget install --id=dotPDNLLC.paintdotnet -e

winget install --id=IrfanSkiljan.IrfanView -e

winget install --id=Microsoft.PowerToys -e

After installing all applications, configure system settings, local policies (gpedit.msc), desktop shortcuts, wallpaper, and other elements.

To clean up the system and reduce the image size, run the following commands:

– Delete shadow copies:

vssadmin delete shadows /All /Quiet

– Clean the WinSxS folder:

Dism.exe /Online /Cleanup-Image /StartComponentCleanup /ResetBase

– Clear downloaded updates:

del %windir%\SoftwareDistribution\Download\*.* /f /s /q

– Perform disk cleanup using the cleanmgr utility:

Cleanmgr /sagerun:1

– Clear Windows logs:

for /F "tokens=*" %1 in ('wevtutil.exe el') DO wevtutil.exe cl "%1"

– Clear the Recycle Bin:

Clear-RecycleBin -Force

To apply the current user’s settings to the default user template, create an unattend.xml file in the directory:

C:\Windows\System32\Sysprep

You can download a ready-made unattend.xml file from our server.

Finally, prepare your customized Windows image for deployment using the sysprep.exe utility. Restore the sysprep window and select the following options:

Enter System Out-of-Box Experience (OOBE)

Generalize

Shutdown

Capturing the Customized Windows Image Using DISM

Now, boot the computer from a Windows installation USB drive and capture the Windows image using DISM. Open the Command Prompt (Shift+F10).

Identify the drive letters assigned to the Windows partition and the clean partition where the WIM file will be saved. Run the following commands:


diskpart
list disk
exit

In our example, the Windows drive is assigned the letter E:, and the clean drive is D:.

To capture an offline Windows image from drive E and save the resulting WIM image to drive D, run:

dism /capture-image /imagefile:D:\install.wim /capturedir:E:\ /ScratchDir:D:\ /name:"MyWinImage" /compress:maximum /checkintegrity /verify /bootable

In our case, capturing the image took approximately 30 minutes.

Replacing the Original Windows Image (Install.wim) on the USB Drive

After capturing the image, replace the original install.wim file on your installation USB drive. We renamed the old image to install.esd_bak and copied the new install.wim to the USB drive.

If the image exceeds 4 GB and your USB drive uses the FAT32 file system, split the file into multiple parts:

Dism /Split-Image /ImageFile:D:\sources\install.wim /SWMFile:c:\tmp\install.swm /FileSize:3500

In this case, DISM will create four files: install.swm, install2.swm, install3.swm, and install4.swm, which should be copied to the \sources folder. The Windows installer will automatically reassemble the SWM files during deployment.

You can now deploy your custom Windows image from the USB drive on any computer. After completing the Windows installation, verify that all preinstalled applications are available:

Get-Package

banner for Windows
Buy Windows от product key from
8.00 € Find Out More
Subscribe
Notify of
guest
0 comments
Inline Feedbacks
View all comments