By Kari the Finn, guest blogger for Ed Tittel, courtesy of TenForums.com
Note: this blog is Part 5 in a series of 6 parts on the topic of using Sysprep to craft a custom ISO for use in installing Windows 10, aimed at the upcoming Creator’s Update scheduled for public release in mid to late April. Your guest blogger for this series is Kari the Finn, well-known Windows Install expert at TenForums.com. He’s the person who put tools together (ESD2ISO and UUP2ISO) that let savvy installers convert Windows OS download files into ISO images that may be used to create bootable installation optical media or USB Flash Drives. Part 1 of this series covered the intro, and Part 2 started users with installation prep; Part 3 explains how to update and customize Windows; Part 4 digs into generalizing a Windows image using the Sysprep utility. Here in Part 5, Kari explains how to capture a generalized Windows image and use it to create an ISO for installation. Don’t let the numbering bother you (Part 1 was an introduction, so step 1 appears in Part 2, step 2 in Part 3, and so on…)
4. Capture Windows image, create ISO
Once Sysprep finishes working its magic, the Windows 10 installer shuts down. Boot the technician machine using the Windows 10 install media, the same you used in the beginning to install Windows. Do not let it boot from hard disk, an HDD or SSD if using a physical machine or VHD) if using Hyper-V!
At the first prompt when Windows setup asks for region and language settings, instead of selecting anything and starting installation, press SHIFT + F10 to open the Recovery Console Command Prompt. Type diskpart and press Enter to start the Disk Partitioning Utility, then type list vol to list all available volumes (partitions). For example, on my Hyper-V VM list vol shows this information:
This is why we named our disk partitions in Part 4, so we can identify them here. Note: the Recovery Console does not use the same drive ID policy as Windows 10. Thus, we need to be sure which drive has Windows installed (as shown above, it appears as drive D:) and which drive will store the captured image for customization and re-use (as shown above, it’s drive E:).
Type exit and press Enter to exit Diskpart.
DISM Does All the Hard Work!
Type (or Copy & Paste) the following command:
dism /capture-image /imagefile:E:\install.wim
/checkintegrity /verify /bootable
If you do copy and paste, remove the spurious line feeds used to make the text visible and readable inside WordPress.
Please check and note the following important details:
- /imagefile:E:\ = drive where install.wim will be saved
- /capturedir:D:\ = drive where Windows is installed
- /ScratchDir:E:\ = drive where temporary working folder Scratch is located
- /name: = any name you like in quotes, not important but obligatory, here I identify the version as 64-bit Win10 Pro
Press Enter to start. Note: this will take some time to complete. On slow physical machines it can take up to 20 – 25 minutes. During the first half of that period you’ll get no progress indicator, either. Just be patient: it will work!
When this command has finished, eject the install media (in Hyper-V select Media menu > DVD Drive > Eject). Next, close Command Prompt and restart the technician machine. This time boot normally from HDD / VHD and let it work through normal OOBE setup.
While the Windows Installer Does Its Thing…
While the technician machine is preparing and setting up Windows, double click the original Windows 10 ISO image you used to mount it on the host computer as a virtual DVD. Then, open it in File Explorer, copy its entire contents (all files and folders) to a new folder on the host HDD. I named this new folder ISO_Files, creating it on drive D: on my host.
When the technician machine is ready and your initial user is logged into the desktop, copy your newly created install.wim file from the image drive (E:) to the Sources subfolder in the folder where you copied the original Windows installation files. In this example, that’s D:\ISO_Files\Sources folder. It will replace (over-write) the original Windows 10 install.wim file.
Hyper-V users should also create a checkpoint now on their technician VM to capture a pristine system image.
Bring on the (Windows Imaging) Tools!
Run Deployment and Imaging Tools Environment elevated, as an admin. It is installed as part of the Windows ADK and can be found in Start > W > Windows Kits. Type CD\ and press Enter to set the working folder to the root of the C: drive. Enter this command:
oscdimg.exe -m -o -u2 -udfver102 -bootdata:2#p0,e,
Please notice: the preceding command is one long continuous command line though it breaks across multiple lines in this blog post. If you cut’n’paste this text remove the spurious linefeeds that WordPress required to make the entire text readable.
Check and the note following details, please:
- d:\iso_files = path to folder where you copied original install files
- d:\Win10PROx64.iso = path and your preferred name for new ISO
With all this work completed, making the ISO takes just a minute or two. When that’s done you can burn the ISO to a DVD or Flash drive, it will work on both BIOS / MBR and UEFI / GPT systems to install your customized Windows with its pre-installed software.
This concludes Part 5 of this 6-part series. Part 1 covered the intro, and Part 2 started users with installation prep; Part 3 explains how to update and customize Windows; Part 4 digs into generalizing a Windows image using the Sysprep utility. Here in Part 5, Kari showed how to capture a generalized Windows image and use it to create an ISO for installation. The sixth and final part explains how to update and maintain this ISO as changes and updates come along. It should post shortly to conclude the whole shebang!
Links to All Series Parts (1-6)
Part 1: Introduction & Overview
Part 2: Install Windows and Prepare Assets
Part 3: Update and Customize Windows, Install Software
Part 4: Generalize Custom Windows Image with Sysprep
Part 5: Capture Custom Windows Image, Create ISO
Part 6: Update/Change Custom Windows ISO