Windows OS Hub
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server 2025
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
    • Proxmox
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows 10
    • Windows Server 2025
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
    • Proxmox
  • PowerShell
  • Linux

 Windows OS Hub / Windows 11 / Create a Custom Windows Image with Pre-installed Apps

February 28, 2024

Create a Custom Windows Image with Pre-installed Apps

In this guide, we’ll cover how to create a custom Windows 10/11 installation image with pre-installed apps, necessary files, and other environment and application settings. Currently, many admins prefer to deploy a clean Windows image and then install all the required programs and tools on the computer: deploy software via GPO, using the installation commands in AutoUnattend.xml or in the %WINDIR%\Setup\Scripts\SetupComplete.cmd script (allow to install software during OOBE), GPO logon scripts. or using other automation tools (SCCM, Intune, MDT, Ansible). However, in some cases, business specifics require that a pre-built Windows image with all the necessary programs be deployed to end-user computers.

Contents:
  • Building a Reference Windows Image with Pre-installed Software
  • Capture a Custom Windows Image Using DISM
  • Replace the Original Install.wim Image File on the USB Flash Drive

The process of creating your custom Windows installation image with pre-installed software can include the following steps:

  1. Deploy a clean Windows instance on a reference computer (virtual machine);
  2. Boot Windows in audit mode, install the apps, configure the environment;
  3. Boot the device into the WinPE environment and capture the WIM image of the installed Windows using DISM;
  4. Replace the original install.wim on the installation USB flash drive (ISO image).
If you are deploying Windows to computers on a corporate network, it is more convenient to use MDT, which allows you to add/update programs during the installation process without having to modify the installation WIM image each time.

Building a Reference Windows Image with Pre-installed Software

The first step is to create a reference image of Windows with all the programs, files, and settings you need. Perform a clean Windows installation on a virtual machine or computer.

Download the original Windows 10/11 installation image as an ISO file or burn it directly to a bootable USB flash drive using the Media Creation Tool or Rufus.

Perform a manual Windows installation and press CTRL+SHIFT+F3 at the OOBE stage (when prompted to select regional settings). This will put the computer into Audit Mode, and you will be automatically logged in as the built-in Administrator account.

Sysprep Audit Mode (Ctrl + Shift + F3)

When the desktop appears, minimize the Sysprep window (don’t close it!!). Then you can start installing programs and updates, and configuring the necessary Windows settings.

I will use the WinGet package manager to install various apps and tools on Windows:

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

Installing software on Windows using the Winget tool

I also manually created directories and copied files for several business apps.

Customize reference Windows image

Customize desktop shortcuts, Start menu tiles, wallpapers, screensavers, color schemes, and more. Configure local Group Policy settings using the gpedit.msc editor. These settings will be applied to all computers that you deploy from this custom Windows image.

Once you have set up the operating system and applications, you must clean up Windows to reduce the final image size.

Delete existing shadow copies and restore points:

vssadmin delete shadows /All /Quiet

Clean up unused components and update files in the WinSxS folder:

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

Remove the Windows Update cache files:

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

You can use this PowerShell script to clean up the Temp, Downloads, and Cache folders in the user profile.

Perform a disk cleanup using the cleanmgr tool:

Cleanmgr /sagerun:1

Clear Event Viewer logs:

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

Empty the Recycle Bin in Windows:

Clear-RecycleBin -Force

To apply the current user’s settings to the Default user (used as a template when creating new Windows users), create an unattend.xml answer file in the C:\Windows\System32\Sysprep directory.

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="specialize">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CopyProfile>true</CopyProfile>
</component>
</settings>
</unattend>

The final step is to prepare your custom Windows image for deployment with the sysprep.exe tool. Expand the Sysprep window and select the following options:

  • Enter System Out-of-Box Experience (OOBE)
  • Generalize
  • Shutdown

Sysprep: prepare image for deployment

When this process is complete, the computer will automatically shut down.

Capture a Custom Windows Image Using DISM

At this stage, you will need to capture an offline Windows image from a local drive, save it as a WIM file, and place it on a separate drive (we connected a separate 60GB empty drive to the computer).

Boot the computer with the referenced Windows image into the WinPE environment (WinRE). Using the Windows installation USB stick, boot the computer and press Shift+F10 to open the command prompt.

Identify the drive letters assigned to the Windows partition and the empty drive to which the WIM file will be copied. Run the command:

diskpart
list disk
exit

check drive letter assigned

In this example, the drive containing Windows is assigned the letter E: and the empty drive is D:.

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

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

It took about 30 minutes to capture the image in my case.
Capture Windows image with DISM

Replace the Original Install.wim Image File on the USB Flash Drive

Once you have captured your customized Windows image, you can replace the original install.wim or install.esd image file in the \sources folder on the installation USB flash drive (ESD is the maximum compression format used for WIM).

In my case, I renamed the old image file to install.esd_bak and copied the new install.wim image to the USB stick.

replace the original install.wim file with a custom wim image

Note that the WIM image size with pre-installed software has increased significantly (from 4GB to 10GB).

If you have a FAT32 bootable USB key for installing Windows on UEFI computers, you cannot save a WIM file larger than 4GB on this file system. A large WIM image file must be split into several smaller SWM files in this case:

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. Copy these files to the \sources folder on the installation media. When Windows Setup installs the operating system, it merges the SWM files.

Now you can use your bootable USB flash drive to deploy the Windows image you created to any computer (you can also install Windows over the network using PXE boot).

Check that all preinstalled apps are available after Windows installation is complete:

Get-Package

Deploy custom Windows image with preinstalled software

The downside of this method of deploying a preconfigured Windows image is that you have to rebuild the image to update any of the apps it contains.

Windows Updates and drivers can be integrated directly into the WIM image. In this case, there is no need to go through the full deployment and image capture cycle.
10 comments
16
Facebook Twitter Google + Pinterest
Windows 10Windows 11
previous post
Find a Linux Process Listening on a Specific Port
next post
Adding ESXi Host to VMware vCenter Server (vCSA)

Related Reading

How to Allow Multiple RDP Sessions on Windows...

March 15, 2024

How to Run Program without Admin Privileges and...

June 8, 2023

How to Install Remote Server Administration Tools (RSAT)...

March 17, 2024

Upgrading to Windows 11 on Unsupported Hardware

February 19, 2026

Managing Windows Firewall Rules with PowerShell

March 11, 2024

How to Fix ‘An Operating System Wasn’t Found’...

August 24, 2023

How to Allow Non-Admin User to Start/Stop Service...

March 15, 2024

Fixing ‘The Network Path Was Not Found’ 0x80070035...

August 31, 2023
join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Recent Posts

  • Load and Initialize Network Drivers in Windows PE or Recovery Environment

    February 25, 2026
  • How to Set a Custom Drive Icon in Windows

    February 17, 2026
  • Managing Per-User Services in Windows

    February 11, 2026
  • Change Default OU for New Computers and Users in AD

    February 2, 2026
  • Where Windows Stores Certificates and Private Keys

    January 22, 2026
  • How to Remove Old (Unused) PowerShell Modules

    January 12, 2026
  • How to Move (Migrate) Windows Shares to a New File Server

    December 24, 2025
  • Using KDC (Kerberos) Proxy in AD for Remote Access

    December 23, 2025
  • Windows: Create (Install) a Service Manually

    December 16, 2025
  • Windows: Auto Switch to Strongest Wi-Fi Network

    December 10, 2025

Follow us

  • Facebook
  • Twitter
  • Youtube
  • Telegram
Popular Posts
  • How to Allow Multiple RDP Sessions on Windows 10 and 11
  • How to Run Program without Admin Privileges and Bypass UAC Prompt
  • Fix: BSOD Error 0x0000007B (INACCESSABLE_BOOT_DEVICE) on Windows
  • Fixing ‘The Network Path Was Not Found’ 0x80070035 Error Code on Windows
  • How to Delete Old User Profiles in Windows
  • How to Install Remote Server Administration Tools (RSAT) on Windows
  • How to Backup and Copy Local Group Policy Settings to Another Computer
Footer Logo

@2014 - 2026 - Windows OS Hub. All about operating systems for sysadmins


Back To Top