First you need to decide if you want only a custom image or do you want multiple image options to choose from.
What you will need:
- One USB flash drive formatted to NTFS to hold your custom image
- Windows 10 DVD or Bootable Flash drive to boot into Windows PE
- Second laptop to manage the images
Single Image
- Format a flash drive to NTFS
- Download the Windows 10 ISO from the windows media creation tool located here
- Mount the ISO and copy the information into a temporary folder
- open sources folder and delete install.esd (we are creating our own custom image so don’t need this)
- Copy the information from the temporary folder to your flash drive and you can delete the temp folder
- Customize windows how you want shut it down and boot into Windows PE
- If you have a DVD or flash drive with windows boot from it and go the advanced options
- Or create your own Windows PE flash drive https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/winpe-intro
- Or using the windows media creation tool you can create a bootable flash drive which comes with Windows PE
- Open a command prompt window (Going off memory click Install then Advanced Options>Command Prompt)
- Normally I go through the drive letters and dir to show the contents till I find the USB stick I want to put my image on
- In this example my the USB drive I want to put my custom image on is letter F
- I will then run this command:
Dism /Capture-Image /ImageFile:F:\sources\install.wim /CaptureDir:c:\ /Compress:fast /CheckIntegrity /Name:"WIN10 Custom" /Description:"WIN10 Custom with Pre-loaded Software"
- This can take about 1 hour but once it is done put the NTFS USB stick in a computer and boot from it to install your custom image (UEFI)
- Note: Older computers may not boot from a NTFS USB stick so you would need to partition it out where the boot files are on the FAT32 and the image is on the NTFS drive
- You could try this https://www.tenforums.com/tutorials/118137-create-bootable-usb-installer-if-install-wim-greater-than-4gb.html
Multiple Images
- Format a flash drive to NTFS
- Download the Windows 10 ISO from the windows media creation tool located here
- Mount the ISO and copy the information into a temporary folder (C:\Temp\Vanilla in my example)
- Next run this command to list the Indexes in the image
dism /Get-WimInfo /WimFile:C:\Temp\Vanilla\Sources\install.esd
- I am interested only in Index 6 Windows 10 Pro so that is what I will be using in my example
- Here is the command I will use to export Index 6 out so I can have a vanilla option on my custom USB drive:
Dism /Export-Image /SourceImageFile:C:\Temp\Vanilla\Sources\install.esd /SourceIndex:6 /DestinationImageFile:C:\Images\install.wim /Compress:fast /CheckIntegrity /DestinationName:"W10 PRO version 20H2 x64 (original)"
- Normally I create a Backup folder and create a Vanilla folder and copy the WIM file in there so I don’t have to do it again if I mess up (C:\Images\Backup\Vanilla\install.wim)
- Next customize windows how you want shut it down and boot into Windows PE
- If you have a DVD or flash drive with windows boot from it and go the advanced options
- Or create your own Windows PE flash drive https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/winpe-intro
- Or using the windows media creation tool you can create a bootable flash drive which comes with Windows PE
- Open a command prompt window (Going off memory click Install then Advanced Options>Command Prompt)
- Normally I go through the drive letters and dir to show the contents till I find the USB stick I want to put my image on
- In this example my the USB drive I want to put my custom image on is letter F
- Then run this command to capture the image:
Dism /Capture-Image /ImageFile:F:\install.wim /CaptureDir:c:\ /Compress:fast /CheckIntegrity /Name:"WIN10 Custom" /Description:"WIN10 Custom with Pre-loaded Software"
- This can take about an hour but once it is done copy the created image to your images directory C:\Images\Custom\install.wim (I also copy this to the backup folder C:\Images\Backup\Custom\Install.wim)
- Now we can merge our custom image into the vanilla image with this command:
Dism /Export-Image /SourceImageFile:C:\Images\Custom\install.wim /SourceIndex:1 /DestinationImageFile:C:\Images\install.wim /DestinationName:"WIN10 x64 PRO (XPS 13 Drivers Installed and Default Software)"
- You can verify your custom image but checking what indexes are there like so:
dism /Get-WimInfo /WimFile:C:\Images\install.wim
- The information should show two indexes one for
W10 PRO version 20H2 x64 (original)
and one for(XPS 13 Drivers Installed and Default Software)
- Now we can delete C:\Temp\Vanilla\Sources\install.esd
- I am going to rename C:\Temp\Vanilla to C:\Temp\Custom
- Copy your custom C:\Images\install.wim to C:\Temp\Custom\sources
- Finally copy all of the contents of C:\Temp\Custom to a flash drive
- Once it is done put the NTFS USB stick in a computer and boot from it to install your custom image (UEFI)
- Note: Older computers may not boot from a NTFS USB stick so you would need to partition it out where the boot files are on the FAT32 and the image is on the NTFS drive
- You could try this https://www.tenforums.com/tutorials/118137-create-bootable-usb-installer-if-install-wim-greater-than-4gb.html
- You can keep adding images by repeating the above steps for each image you want
References:
https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/deploy-a-custom-image
https://www.tenforums.com/tutorials/133098-dism-create-bootable-iso-multiple-windows-10-images.html
https://www.tenforums.com/tutorials/118137-create-bootable-usb-installer-if-install-wim-greater-than-4gb.html
https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/deploy-a-custom-image
https://answers.microsoft.com/en-us/insider/forum/insider_wintp-insider_install-insiderplat_pc/the-problems-between-installwim-and-installesd-and/339846cc-d4e8-4f76-a31c-1d4d7bd21371
https://www.intel.com/content/www/us/en/support/articles/000023992/memory-and-storage/intel-optane-memory.html