{"id":9225,"date":"2024-02-28T19:09:41","date_gmt":"2024-02-28T19:09:41","guid":{"rendered":"https:\/\/cheapwindowsvps.com\/blog\/how-to-craft-your-own-custom-windows-image-with-pre-installed-applications\/"},"modified":"2025-01-20T09:56:32","modified_gmt":"2025-01-20T09:56:32","slug":"how-to-craft-your-own-custom-windows-image-with-pre-installed-applications","status":"publish","type":"post","link":"https:\/\/cheapwindowsvps.com\/blog\/how-to-craft-your-own-custom-windows-image-with-pre-installed-applications\/","title":{"rendered":"How to Craft Your Own Custom Windows Image with Pre-Installed Applications"},"content":{"rendered":"<p><p>In this guide, we\u2019ll 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: <a href=\"https:\/\/woshub.com\/deploy-software-via-gpo\/\" rel=\"nofollow noopener\" target=\"_blank\">deploy software via GPO<\/a>, using the installation commands in <code>AutoUnattend.xml<\/code> or in the <code>%WINDIR%SetupScriptsSetupComplete.cmd<\/code> script (allow to install software during OOBE), <a href=\"https:\/\/woshub.com\/running-powershell-startup-scripts-using-gpo\/\" rel=\"nofollow noopener\" target=\"_blank\">GPO logon scripts<\/a>. or using other automation tools (SCCM, Intune, MDT, <a href=\"https:\/\/woshub.com\/ansible-manage-windows-machines\/\" rel=\"nofollow noopener\" target=\"_blank\">Ansible<\/a>). However, in some cases, business specifics require that a pre-built Windows image with all the necessary programs be deployed to end-user computers.<\/p>\n<\/p>\n<p><p>The process of creating your custom Windows installation image with pre-installed software can include the following steps:<\/p>\n<\/p>\n<ol>\n<li>Deploy a clean Windows instance on a reference computer (virtual machine);<\/li>\n<li>Boot Windows in audit mode, install the apps, configure the environment;<\/li>\n<li>Boot the device into the WinPE environment and capture the WIM image of the installed Windows using DISM;<\/li>\n<li>Replace the original install.wim on the installation USB flash drive (ISO image).<\/li>\n<\/ol>\n<p><div>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.<\/div>\n<\/p>\n<p><h2>Building a Reference Windows Image with Pre-installed Software<\/h2>\n<\/p>\n<p><p>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.<\/p>\n<\/p>\n<p><p>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.<\/p>\n<\/p>\n<p><p>Perform a manual Windows installation and press <code>CTRL+SHIFT+F3<\/code> 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 <a href=\"https:\/\/woshub.com\/enable-built-in-administrator-account-in-windows-10\/\" rel=\"nofollow noopener\" target=\"_blank\">the built-in <strong>Administrator<\/strong> account<\/a>.<\/p>\n<\/p>\n<p><p>When the desktop appears, minimize the Sysprep window (don\u2019t close it!!). Then you can start installing programs and updates, and configuring the necessary Windows settings.<\/p>\n<\/p>\n<p><p>I will use the <a href=\"https:\/\/woshub.com\/using-winget-package-manager-windows\/\" rel=\"nofollow noopener\" target=\"_blank\"><strong>WinGet <\/strong>package manager<\/a> to install various apps and tools on Windows:<\/p>\n<\/p>\n<p><p><code>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<\/code><\/p>\n<p>I also manually created directories and copied files for several business apps.<\/p>\n<p>Customize desktop shortcuts, Start menu tiles, wallpapers, screensavers, color schemes, and more. Configure <a href=\"https:\/\/woshub.com\/group-policy-editor-gpedit-msc-for-windows-10-home\/\" rel=\"nofollow noopener\" target=\"_blank\">local Group Policy settings<\/a> using the <code>gpedit.msc<\/code> editor. These settings will be applied to all computers that you deploy from this custom Windows image.<\/p>\n<\/p>\n<p><p>Once the operating system and applications are installed, it is required to clean up Windows to minimize the end image size.<\/p>\n<\/p>\n<p><p>Eliminate the existing shadow copies and restore points:<\/p>\n<\/p>\n<p><p><code>vssadmin delete shadows \/All \/Quiet<\/code><\/p>\n<\/p>\n<p><p>Purge unused components and update files in the <a href=\"https:\/\/woshub.com\/how-to-clean-up-and-compress-winsxs-folder-in-windows-8\/\" rel=\"nofollow noopener\" target=\"_blank\">WinSxS folder<\/a>:<\/p>\n<\/p>\n<p><p><code>Dism.exe \/Online \/Cleanup-Image \/StartComponentCleanup \/ResetBase<\/code><\/p>\n<\/p>\n<p><p>Remove the Windows Update cache files:<\/p>\n<\/p>\n<p><p><code>del %windir%SoftwareDistributionDownload*.* \/f \/s \/q<\/code><\/p>\n<\/p>\n<p><p>You can use <a href=\"https:\/\/woshub.com\/cleanup-profile-cache-temp-files-powershell-gpo\/\" rel=\"nofollow noopener\" target=\"_blank\">this PowerShell script<\/a> to clean up the Temp, Downloads, and Cache folders in the user profile.<\/p>\n<p>Perform a disk cleanup using the <a href=\"https:\/\/woshub.com\/disk-cleanup-on-windows-server-2012-2008-without-installing-desktop-experience\/\" rel=\"nofollow noopener\" target=\"_blank\">cleanmgr<\/a> tool:<\/p>\n<p><code>Cleanmgr \/sagerun:1<\/code><\/p>\n<p><a href=\"https:\/\/woshub.com\/how-to-clear-windows-event-logs-using-powershell-or-wevtutil\/\" rel=\"nofollow noopener\" target=\"_blank\">Clear Event Viewer logs:<\/a><\/p>\n<\/p>\n<p><p><code>for \/F \"tokens=*\" %1 in ('wevtutil.exe el') DO wevtutil.exe cl \"%1\"<\/code><\/p>\n<\/p>\n<p><p>Empty the Recycle Bin in Windows:<\/p>\n<\/p>\n<p><p><code>Clear-RecycleBin -Force<\/code><\/p>\n<\/p>\n<p><p>To apply the existing user settings to the Default user, which serves as a model for creating new users in Windows, generate an <code>unattend.xml<\/code> answer file within the <code>C:WindowsSystem32Sysprep<\/code> directory.<\/p>\n<\/p>\n<p><pre><\/p><p>&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;<\/p><p>&lt;unattend xmlns=\"urn:schemas-microsoft-com:unattend\"&gt;<\/p><p>&lt;settings pass=\"specialize\"&gt;<\/p><p>&lt;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\"&gt;<\/p><p>&lt;CopyProfile&gt;true&lt;\/CopyProfile&gt;<\/p><p>&lt;\/component&gt;<\/p><p>&lt;\/settings&gt;<\/p><p>&lt;\/unattend&gt;<\/p><p><\/pre>\n<\/p>\n<p><p>The last step is preparing your customized Windows image for deployment using the sysprep.exe tool. Open the Sysprep window and select the options mentioned below:<\/p>\n<\/p>\n<ul>\n<li>Initiate System Out-of-Box Experience (OOBE)<\/li>\n<li>Generalize<\/li>\n<li>Shutdown<\/li>\n<\/ul>\n<p><p>When this process is complete, the computer will automatically shut down.<\/p>\n<\/p>\n<p><h2>Capture a Custom Windows Image Using DISM<\/h2>\n<\/p>\n<p><p>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).<\/p>\n<\/p>\n<p><p>Boot the computer with the referenced Windows image into the WinPE environment <\/p>\n<p><a href=\"https:\/\/woshub.com\/restoring-windows-recovery-environment-winre-in-windows-10\/\" rel=\"nofollow noopener\" target=\"_blank\">WinRE<\/a>). <\/p>\n<p>Using the Windows installation USB stick, boot the computer and press <code>Shift+F10<\/code> to open the command prompt.<\/p>\n<\/p>\n<p><p>Identify the drive letters designated to the Windows partition and the unoccupied drive where the WIM file will be transferred. Execute the following command:<\/p>\n<\/p>\n<p><p><code>diskpart<br \/> list disk<br \/> exit<\/code><\/p>\n<\/p>\n<p><p>In the stated example, the drive hosting Windows is assigned the letter <strong>E:<\/strong> and the blank drive is labeled as <strong>D:<\/strong>.<\/p>\n<\/p>\n<p><p>To seize an offline Windows image from the E drive and preserve the resulting WIM image to the D drive, implement the command:<\/p>\n<\/p>\n<p><p><code>dism \/capture-image \/imagefile:D:install.wim \/capturedir:E: \/ScratchDir:D: \/name:\"MyWinImage\" \/compress:maximum \/checkintegrity \/verify \/bootable<\/code><\/p>\n<\/p>\n<p><p>It took about 30 minutes to capture the image in my case.<\/p>\n<\/p>\n<p><h2>Replace the Original Install.wim Image File on the USB Flash Drive<\/h2>\n<\/p>\n<p><p>Once you have captured your customized Windows image, you can replace the original install.wim or install.esd image file in the <code>sources<\/code> folder on the installation USB flash drive. <\/p>\n<p><a href=\"https:\/\/woshub.com\/how-to-convert-install-esd-in-to-iso-image\/\" rel=\"nofollow noopener\" target=\"_blank\">ESD<\/a> is the maximum compression format used for WIM.<\/p>\n<\/p>\n<p><p>I made a change to the old image file name to <code>install.esd_bak<\/code> and duplicated the new <code>install.wim<\/code> image onto the USB device.<\/p>\n<p>Keep in mind that the WIM image dimension, inclusive of pre-installed software, has expanded significantly (from 4GB to 10GB).<\/p>\n<p>Consiodering you possess a <a href=\"https:\/\/woshub.com\/how-to-create-uefi-bootable-usb-drive-to-install-windows-7\/\" rel=\"nofollow noopener\" target=\"_blank\">FAT32 bootable USB device for installing Windows on UEFI devices<\/a>, it is impossible to save a WIM file larger than 4GB on this kind of file system. In this situation, a chunky WIM image file has to be fragmented into multiple smaller SWM files:<\/p>\n<p><code>Dism \/Split-Image \/ImageFile:D:sourcesinstall.wim \/SWMFile:c:tmpinstall.swm \/FileSize:3500<\/code><\/p>\n<\/p>\n<p><p>In this scenario, DISM formulates four files namely <code>install.swm<\/code>, <code>install2.swm<\/code>, <code>install3.swm<\/code>, and <code>install4.swm<\/code>. It&#8217;s advisable to transfer these files to the <code>sources<\/code> directory on the installation medium. When the Windows Setup begins the OS installation, it brings together the SWM files.<\/p>\n<p>You are now equipped to use your bootable USB flash drive to deploy the Windows image that you have crafted to any computer (the alternative option is to <a href=\"https:\/\/woshub.com\/deploy-windows-over-network-pxe-boot\/\" rel=\"nofollow noopener\" target=\"_blank\">install Windows across the network using PXE boot<\/a>).<\/p>\n<p>Ensure that every preinstalled app is available following the full Windows installation:<\/p>\n<p><code>Get-Package<\/code><\/p>\n<\/p>\n<p><p>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.<\/p>\n<\/p>\n<p><p><a href=\"https:\/\/woshub.com\/add-updates-into-windows-image\/\" rel=\"nofollow noopener\" target=\"_blank\">Windows Updates<\/a> and <a href=\"https:\/\/woshub.com\/integrate-drivers-to-windows-install-media\/\" rel=\"nofollow noopener\" target=\"_blank\">drivers<\/a> 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.<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this guide, we\u2019ll 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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":9226,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[98,99],"tags":[],"class_list":["post-9225","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-windows-10","category-windows-11"],"_links":{"self":[{"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/posts\/9225","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/comments?post=9225"}],"version-history":[{"count":2,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/posts\/9225\/revisions"}],"predecessor-version":[{"id":10317,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/posts\/9225\/revisions\/10317"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/media\/9226"}],"wp:attachment":[{"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/media?parent=9225"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/categories?post=9225"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/tags?post=9225"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}