If you want to customize the install.esd file, you have to convert ESD file to WIM. Here are steps to do in a simple and straightforward way.
If you've downloaded Windows 10 ISO directly from Microsoft website or using the Media Creation Tool, you might have noticed that Microsoft is using install.esd file instead of the install.wim file. In case you don't know Microsoft started using WIM file format for Windows deployment ever since the Vista days. One of the best things about the WIM file format is that it allows servicing using the DISM tool. This means the system administrators can install drivers and updates and make all kinds of changes before deploying the operating system.
In recent years, Microsoft switched to ESD format thanks to its higher compression ratio compared to the old WIM format. The compression makes the installation file highly compact and easy to deploy. However, the drawback is that the ESD files are encrypted and read-only. This means that if you want to include updates and drives and make any other changes before deploying the OS, you need to convert the install.esd file to install.wim file.
The good thing is, it is pretty easy to do. Follow the below steps to convert ESD to WIM.
DISM Command to Convert ESD to WIM
Windows has a built-in tool called DISM (Deployment Image Servicing and Management) that gives you the option to convert ESD to WIM with just a few commands. Before proceeding, have the Windows 10 ISO or USB drive handy. We need the ESD file in that.
1. First, create a new folder in the drive or partition of your choice and name it "Win10WIM-ISO". The folder name can be anything.
2. Open Windows 10 ISO or USB installation drive and copy all the contents in it to the newly created Win10WIM-ISO folder. Once copied this is how it looks like.
3. Now, search for "cmd" in the start menu, right-click on it and select "Run as administrator" option. This will open the elevated Command Prompt window.
4. In the Command Prompt window, execute the below command. Replace "X" with the actual drive letter. If you've used a different name for the folder we created earlier then change the folder name in the command to reflect that.
dism /Get-WimInfo /WimFile:X:\Win10WIM-ISO\Sources\install.esd
If your ISO or installation has dual architecture files (x86 or x64) then you have to modify the install.esd path in the above command to match the folder structure. The command will look something like this.
dism /Get-WimInfo /WimFile:X:\Win10WIM-ISO\x86\Sources\install.esd
dism /Get-WimInfo /WimFile:X:\Win10WIM-ISO\x64\Sources\install.esd
5. The above command will list all the different editions in the ISO or USB drive. Find your preferred edition and note down the Index number. In my case, I want the Pro edition. So, the Index number is 6.
6. Now, execute the below command while replacing "X" with the actual drive letter. Also, change the SourceIndex number according to the Index number seen in step 5.
dism /Export-Image /SourceImageFile:X:\Win10WIM-ISO\Sources\install.esd /SourceIndex:6 /DestinationImageFile:X:\Win10WIM-ISO\Sources\install.wim /Compress:Max /CheckIntegrity
Note: Just like before, if the ISO or USB installation is dual architecture, modify the command to match the install.esd path.
7. After executing the command, the conversion process will start. It can take some time to complete.
Once done you will see the install.wim file in the same folder.
You can now delete the install.esd file. Make any necessary changes to the WIM file and create a new ISO file from the newly created folder. You can then use that ISO to deploy Windows.
That is it. I hope that helps. If you are stuck or need some help, comment below and I will try to help as much as possible. If you like this article do check out how to create custom recovery partition in Windows 10.