If you need or want more control over how Windows is installed you can do so with DISM. There are some use cases for this is. Examples include:
You have multiple disks in a computer where there is more than one EFI partition present. It appears the Windows installer will sometimes get confused during the install process. It will either write to an EFI partition not on the destination disk or flat out refuse to install.
You have prepared a system image you want to use that contains a pre-configured Windows install with software you have installed (sysprep).
You'll of course need a Windows Install USB to boot from. Boot from it and press SHIFT + F10 to open Command and enter the command line steps below in
list volume - Note the mount letter assigned to the USB device. You'll need this later to replace example letter
list disk - We need to show all disks and their numbers.
select disk # - Replace # with the target disk you want to use.
detail disk - Ensure you have the correct disk. You can verify by checking the name, size and type of disk it is.
clean - This wipes the entire disk.
convert gpt - This is required for proper installation on modern hardware.
create part EFI size=200 - This is EFI boot.
format fs=fat32 label="EFI" - Formats EFI.
assign letter=Y - Assign EFI to Y.
create part MSR size=16 - This is for system use. DO NOT FORMAT!
create part pri size=1024 - This is the Recovery Tools (WinRE).
format fs=ntfs quick label="Recovery" - Formats Recovery.
assign letter=R - Assign Recovery to R.
create part pri - Creates the primary partition for Windows.
format fs=ntfs quick label="Windows" - Format Windows.
assign letter=W - Assign partition to W.
For simplicity, you can create any additional partitions you may need after Windows is installed with Disk Manager.
X in the example with the letter assigned to your USB device. You need to find the index you want. This determines if you install Home, Pro, etc. and their N or KN variants:
> dism /Get-WimInfo /WimFile:X:\Sources\install[.wim|.esd]
Look over the results displayed to find the number pertaining to the edition you want. Here is an example of what Media Creation Tool gives you.
Index : 1Name : Windows 10 HomeDescription : Windows 10 HomeSize : 14,513,453,277 bytesIndex : 2Name : Windows 10 Home NDescription : Windows 10 Home NSize : 13,698,165,844 bytesIndex : 3Name : Windows 10 Home Single LanguageDescription : Windows 10 Home Single LanguageSize : 14,495,067,516 bytesIndex : 4Name : Windows 10 EducationDescription : Windows 10 EducationSize : 14,780,689,298 bytesIndex : 5Name : Windows 10 Education NDescription : Windows 10 Education NSize : 13,967,235,459 bytesIndex : 6Name : Windows 10 ProDescription : Windows 10 ProSize : 14,782,181,615 bytesIndex : 7Name : Windows 10 Pro NDescription : Windows 10 Pro NSize : 13,968,715,159 bytes
> dism /Apply-Image /ImageFile:X:\Sources\install[.wim|.esd] /index:[1|2|3|4|5|6] /ApplyDir:C:\
A complete example to install Home would be:
> dism /Apply-Image /ImageFile:H:\Sources\install.esd /index:1 /ApplyDir:W:\
After the image is applied, you need to create EFI boot files:
> bcdboot W:\Windows /s Y: /f UEFI
Create the WinRE folder structure:
> md R:\Recovery\WindowsRE
Copy the recovery tools:
> xcopy /h W:\Windows\System32\Recovery\Winre.wim R:\Recovery\WindowsRE\
Link recovery tools:
> W:\Windows\System32\Reagentc /Setreimage /Path R:\Recovery\WindowsRE /Target W:\Windows
Reboot by exiting the installer. System will reboot into Windows installation and complete the process. If you want to change the user folder path, do not complete the install. Read here. Once setup, you can navigate to
C:\Windows\System32\Recovery and delete the file Winre.wim. You already have a copy on the recovery partition.