When trying to install Windows 10 on 2011 iMac keep getting error 0x8007000D windows cannot open the required file D:\sources\install.wim
How to Use the Command Line Interface (CLI) to Install a BIOS Booting Windows 10

Part 1: Build the Installation Flash Drive


  Note: The version of macOS is High Sierra 10.13.6.



Use the Disk Utility application to erase a 16 GB or larger flash drive. Choose the parameters shown in the image below.


Download latest 64 bit Windows 10 from Microsoft. In my case, this was the file named Win10_1909_Engish-x64.iso.
User Finder to mount Windows 10 ISO and copy the files to WINSTALL. When finished unmount the ISO. Below is what appeared on my WINSTALL volume.


From the Safari menu bar, select Develop → User Agent → Microsoft Edge. Click on this link, then download gdisk. When finished, select Develop → User Agent → Default (Automatically Chosen) from the Safari menu bar


  Note: If Develop does not appear on the Safari menu bar, then check off “Show Develop menu in menu bar” in Safari Preferences. To reach the check box, select Safari → Preferences… from the Safari menu bar, then select the Advanced tab. 

From the gdisk download, copy the file gdisk64.exe to WINSTALL.  Below is what appeared on my WINSTALL volume.


Download the latest Window Support Software (Boot Camp Support Software) for your Mac from Install Windows 7 on your Mac using Boot Camp. Or you can try using the Boot Camp Assistant to download the software.
Copy Windows Support Software to WINSTALL. Below is what appeared on my WINSTALL volume. The files came from the website Boot Camp Support Software 5.1.5621.




Part 2: Create Space for Windows 10

Use the Disk Utility or the diskutil command to create an ExFAT partition for Windows 10. 



When finished, the output from diskutil list appeared as shown below.



Part 3: Install Windows 10


EFI boot from the flash drive.
When you see the windows shown below, press the shift+F10 key combination to open a Command Prompt window.


Enter the command echo list volume | diskpart to list the volumes. Below is an image of my results. If you get different drive letter mappings, then make the appropriate substitutions.


Hybrid partition the internal drive. The commands for my configuration are given below.


  Note: The gdisk version is 1.0.5.


d:gdisk64 0:
r
h
2 3 4
y
af
n
ab
n
07
y
w
y

Once again, enter the command echo list volume | diskpart to list the volumes. Below is an image of my results. If you get different drive letter mappings, then make the appropriate substitutions.


Use the command given below to format BOOTCAMP. When asked for the current volume label, enter BOOTCAMP.

format c: /fs:ntfs /v:BOOTCAMP /q

Copy the Windows 10 files to the internal drive. If desired, substitute "Windows 10 Home" in the command given below.

dism /apply-image /imagefile:d:\sources\install.wim /name:"Windows 10 Pro" /applydir:c:\ /checkintegrity

Install the boot data and files for a BIOS boot.

bcdboot c:\windows /l en-us /s c: /f bios

bootsect /nt60 c: /mbr

Close the Command Prompt window by entering the command given below.

exit

When the image below appears, click on the red X, then the Yes button. The Mac should reboot to macOS.


From the Startup Disk pane of System Preferences, select Windows and restart the Mac. Windows should finish installing. Below is an image of the Startup Disk pane after selecting Windows.


Install the Windows Support Software. Basically, try running the setup Application in the BootCamp folder on the WINSTALL flash drive. If the software will not install, then open a Administrator Command Prompt window and enter the command BootCamp.msi in the \BootCamp\Drivers\Apple folder on the WINSTALL flash drive.
Use the Apple Software Update application to install all updates from Apple.


Additional References

DISM Image Management Command-Line Options
DISM Driver Servicing (.inf) Command-Line Options
BCDBoot Command-Line Options
BIOS/MBR-based hard drive partitions
UEFI/GPT-based hard drive partitions
Dual Boot Win 7 on MBR with Win 10 on GPT
How to install Windows 10 into a 2011 iMac without using the Boot Camp Assistant, an optical (DVD) drive or third party tools?