Getty Images
How to create a custom Windows 11 ISO file
With a custom Windows 11 ISO file, IT departments can streamline deployment and apply new version of Windows to repair OS instances.
A custom Windows 11 ISO makes a great foundation for Windows deployment and updates. Careful customization will allow IT administrators to provide the ideal desktop and application setup for their end users.
When it comes to installing and updating Windows desktops, a customized image file -- often called an ISO -- provides the basis for large-scale deployments. ISOs can be especially helpful for onboarding users by job role or target PC requirements.
What is a Windows ISO?
A Windows ISO file typically refers to a disk image that includes all the data needed to install a Windows OS.
In some contexts, ISO stands for the International Organization for Standardization, but when discussing Windows ISOs, it refers to the ISO 9660 or 13346 standards. These standards describe how a single meta file can capture and represent an exact copy -- in this case, a disk image -- of the data and structure of optical media such as CD, DVD, or Blu-ray discs. Though these types of media aren't commonly used today, the ISO format is now a standard approach to package up and distribute OS images for installation, mounting, access and more.
This applies to modern Windows versions where, for example, Microsoft makes an ISO available for Windows 11 as one of the options on its Download Windows 11 webpage. While downloading the ISO onto a DVD is still possible and still referenced on the site, this is rarely done in enterprise settings.
Examining the Windows 11 ISO
As a desktop administrator, once you download or otherwise obtain a Windows ISO, you can mount it using File Explorer to examine its contents. At time of writing, the current Windows 11 ISO download file is named Win11_23H2_English_x64v2.iso. If you right click that file in Explorer, the Mount option appears among the pop-up menu options as shown in Figure 1.
If you select the Mount option, the ISO's contents will appear as a virtual DVD drive in File Explorer. This can take as long as a minute before an "Open File -- Security Warning" window appears, so be patient. Click Open to mount the ISO. In this example, it appears as DVD Drive (H:) CCOMA_XFRE_EN-US_DV9.
Figure 2 shows the familiar structure of a Windows install disk, with folders named boot, efi, sources and support as well as the familiar setup.exe file.
What should you use a Windows ISO for?
A Windows ISO can serve a variety of purposes. You can use the Microsoft Media Creation tool -- also known as MediaCreationTool_Win11_23H2.exe -- to build bootable media. It incorporates some chosen or targeted Windows ISO or third-party tools.
First and foremost, a bootable ISO can perform what's called a clean install of Windows 11 on a PC. That means you can either completely replace an existing Windows C drive with all new elements or perform a bare metal install on a PC that lacks an OS of any kind.
You can also boot into Windows Recovery from this media and run various Windows boot options, including the Advanced options menu. The menu provides access to various repair and recovery operations including a command line interface labeled Command Prompt.
Even when a mounted ISO isn't used as a boot source, you can run its setup.exe -- the Windows installer -- to perform an in-place repair install of Windows 11 based on the ISO's OS version. This approach is the same as the Settings > System > Recovery > Reinstall now option in newer Windows 11 versions, specifically version 23H2 and higher.
Why should you customize a Windows 11 ISO?
Inside a Windows 11 ISO, there's a complete and installable version of the Windows 11 OS ready to be installed or used for repairs and recovery. By changing the contents and capabilities of that runnable Windows version, you can manage and streamline the Windows deployment process.
For example, a fully configured OS image can include third-party programs and features that aren't provided by default when installing from a vanilla Windows ISO available from Microsoft's website.
You can also prune a Windows image by editing the Programs and Features item in Control Panel or by uninstalling built-in but unwanted applications from a plain vanilla image. For organizations that support specific PC configurations and peripherals, you can update a Windows installation to include necessary drivers or support software. OEM-specific utilities or tools, such as those commonly found on HP, Dell, and Lenovo laptops or desktops, would be a good candidate.
Given standard PC hardware, it's typical to set up a reference PC, which includes all additions, deletions, preferences and settings that match such a configuration deployed in offices or in the field. Then, IT pros can try out, test and finalize a current base image for each update cycle. This can serve as the basis when deploying PCs to users as well as as a reference point for repairing, recovering and updating already deployed PCs in users' hands.
How to capture a Windows image and apply it to an ISO
The service operation responsible for supporting and deploying PCs will need to maintain a physical PC or an equivalent VM for each standard configuration in actual use. Alternatively, that operation can obtain and use a representative unit to make sure everything is set up, configured and working as desired. Then, deploy that unit to some user once the bulk of the user population has been serviced.
Microsoft calls this process capturing a Windows image. It uses a running Windows installation with all desired customizations as the basis for creating an install Windows Image (WIM) file. This custom file replaces install.wim in the Sources folder within the ISO used to drive install, repair and recovery capabilities going forward.
Follow these steps to capture an image:
- Boot the reference PC using the Windows Preinstallation Environment. A Windows boot environment from a bootable ISO should suffice.
- This step is optional. Microsoft provides an optimization tool to decrease how long it takes a device to boot after the image is applied. This can be especially useful for large-scale deployments. Run this Deployment Image Servicing and Management command: DISM /image's:\ /optimize-image /boot
- Capture the Windows partition from the reference PC, using another DISM command, where the \ImageFile directive identifies the target image file, and \CaptureDir identifies the reference PC boot or system drive root. You'll want to use unique names for reference devices rather than the generic term reference shown here (e.g., TPMWP16Gen1 for a Lenovo ThinkPad Mobile Workstation P16 Gen 1 laptop): DISM /Capture-Image /ImageFile:"D:\Images\Reference.wim" /CaptureDir:C:\ /Name:Reference.
The DISM /Capture-Image command creates a customized WIM file -- namely, Reference.wim in the previous example -- that provides the basis for later deployment. This comes from using a special script named ApplyImage.bat based around the Microsoft Sysprep utility. At the heart of this script is a DISM /Apply-Image command. Its general syntax looks like DISM /Apply-Image /ImageFile:%1 /Index:1 /ApplyDir:W:\.
Here, %1 is an input parameter in the script for the /ImageFile to be created. It identifies a file specification for the image file, such as Reference.wim. The /Index directive identifies an image index for multi-part image files. It defaults to 1 for a single-partition, single-image file like the one the previous DISM /Capture-Image command creates. Finally, the /ApplyDir directive points to a mapped drive -- W -- where the reference image file is stored for the script to consume.
Additional useful DISM commands
There are several tools that can help you work on Windows images. The ultimate reference here is the Microsoft Learn "DISM Image Management Command-Line Options" article, which explains what the command can do and the precise syntax that allows it to function. Some of the most relevant actions include the following:
- Image management command-line options. Apply, capture, optimize, commit, delete and other key image operations.
- Operating system Package (CAB or MSU) servicing options. Get, add or remove OS packages and information; manage OS features; and clean up OS images
- Provisioning package (PPKG) command-line options. Add settings and Windows desktop applications, and reduce Windows installation image size. Similar capabilities also exist for app packages (APPX or APPXBUNDLE) and app patches (MSP).
- Windows PE servicing. Provides mechanisms to operate on the Windows Preinstallation Environment such as adding drivers, language packs and deployment prep.
- OS uninstall and rollback options. Provide mechanisms to uninstall a current Windows version and roll back to a previous version.
- Settings management. You can manage settings for default application associations, languages and international options, capabilities packages, and Windows editions.
- Driver management. Add, view, remove, or export Windows device drivers (INF).
- XML application. Use unattended servicing to apply an unattend.xml answer file to an offline Windows image. This allows multiple packages to be managed -- especially helpful for those with dependencies such as requirements for .NET versions and APIs.
Ed Tittel is a 30-plus year IT veteran who has worked as a developer, networking consultant, technical trainer and writer.