Published 2024-10-08 by TechNet New England
Deployment servers like WDS and PXE are great for large environments, but sometimes you just need a simple bootable ISO that installs Windows with your apps and settings already configured. Maybe you're setting up 5-10 machines for a small client, or you want a consistent baseline for your shop without maintaining deployment infrastructure.
This guide walks you through creating a custom Windows ISO using Sysprep and DISM. The result is a bootable disc (or USB) that installs Windows just like the original Microsoft media - except it includes your software, drivers, and configurations.
What You'll Need
- A reference PC or VM with a clean Windows 10/11 installation
- Original Windows installation media (ISO)
- A USB drive or network share to save the captured image
- Windows ADK (for oscdimg.exe) - optional but recommended for creating the final ISO
Step 1: Install Windows on Your Reference Machine
Start with a clean Windows installation on a PC or virtual machine. This will be your "golden image" that gets cloned to the ISO.
Tip: Use a VM if possible. It's easier to snapshot and retry if something goes wrong.
Step 2: Enter Audit Mode
When you reach the Windows Out-of-Box Experience (OOBE) - the screen asking you to select your region - press Ctrl + Shift + F3.
This boots Windows into Audit Mode as the built-in Administrator. You'll see a Sysprep dialog box appear - just minimize it for now.
Step 3: Customize Your Image
Now install everything you want in your golden image:
- Windows Updates
- Hardware drivers (if targeting specific hardware)
- Microsoft 365 or other standard applications
- Your RMM agent (if you want it pre-installed)
- Browser settings, default apps, etc.
Important:
- Don't join a domain - you'll do that after deployment
- Don't create user accounts - OOBE will handle that
- Remove any temporary files and empty the Recycle Bin
- Run Disk Cleanup to reduce image size
Step 4: Run Sysprep to Generalize
Once your image is configured, run Sysprep to prepare it for capture:
C:\Windows\System32\Sysprep\sysprep.exe /generalize /oobe /shutdown
Or use the GUI: open the Sysprep dialog, select "Enter System Out-of-Box Experience (OOBE)", check "Generalize", and choose "Shutdown".
What this does:
- /generalize - Removes hardware-specific drivers and resets the SID
- /oobe - Forces Windows to run the first-time setup on next boot
- /shutdown - Shuts down so you can capture without booting into the generalized image
Warning: Do not power on the reference machine after Sysprep completes. If it boots, you'll need to run Sysprep again.
Step 5: Boot to WinPE and Capture the Image
Boot the reference machine from the Windows installation media (USB or DVD). On the first screen, press Shift + F10 to open a command prompt.
First, identify your drive letters:
diskpart
list vol
exit
Note which drive letter is your Windows installation (usually D: in WinPE) and where you'll save the image (USB drive or network share).
Capture the image with DISM:
dism /capture-image /imagefile:E:\install.wim /capturedir:D:\ /name:"Windows 10 Custom" /compress:maximum
Replace E: with your destination drive and D: with your Windows partition. This creates a compressed WIM file containing your entire configured Windows installation.
Step 6: Build Your Custom ISO
Now you'll replace the standard install.wim on the Windows installation media with your custom one.
Extract the contents of the original Windows ISO to a folder (e.g., C:\ISO_Files). You can use 7-Zip or mount the ISO and copy the files.
Replace the file at sources\install.wim (or install.esd) with your captured install.wim.
Create the new ISO using oscdimg from the Windows ADK:
oscdimg -m -o -u2 -udfver102 -bootdata:2#p0,e,bC:\ISO_Files\boot\etfsboot.com#pEF,e,bC:\ISO_Files\efi\microsoft\boot\efisys.bin C:\ISO_Files C:\CustomWindows.iso
This creates a bootable ISO that works with both BIOS and UEFI systems.
Alternative: Use a Tool
If the oscdimg command looks intimidating, tools like AnyBurn or PowerISO can create bootable ISOs from the folder contents. Just make sure to use the original boot files.
Step 7: Test Your ISO
Before deploying to real hardware, test your ISO in a VM. Boot from it, run through OOBE, and verify:
- All your applications are installed
- Settings are correct
- No leftover user profiles or machine-specific data
Tips for Maintaining Your Image
- Version your images: Name them with dates (e.g., Win10_Custom_2024-10.iso)
- Document what's included: Keep a text file listing installed software and settings
- Update quarterly: Rebuild every few months to include cumulative updates
- Keep the reference VM: Snapshot it before Sysprep so you can make changes later
When This Approach Makes Sense
This method is ideal for:
- Small deployments (under 20 machines)
- Environments without deployment infrastructure
- Creating a consistent baseline for new client onboarding
- Field technicians who need portable deployment media
For larger environments or frequent deployments, consider MDT (Microsoft Deployment Toolkit) or WDS. But for simplicity and portability, a custom ISO is hard to beat.
Questions about Windows deployment or imaging? Contact us - we're happy to help.