Hi
In many cases we need to add drivers for nvme or USB in Windows 7 installation media beacause new hardware is not supported by original media.
One method is to update boot.wim and install wim from sources folder (in my case iso image was written already on USB stick).
I make tmp folder info drive C.
In my case copy boot.win and install.wim into c:\tmp
In tmp make other folders (mount,updates and nvme).
Finally in my folder c:\tmp we have following structure:
==============================================================
C:\tmp>dir
Volume in drive C has no label.
Volume Serial Number is 8CFB-6090
Directory of C:\tmp
12/25/2022 01:31 AM <DIR> .
12/25/2022 01:31 AM <DIR> ..
12/25/2022 01:15 AM 172,568,187 boot.wim
12/25/2022 01:19 AM 2,841,234,901 install.wim
12/25/2022 01:20 AM <DIR> mount
12/25/2022 01:13 AM <DIR> nvme
12/25/2022 01:31 AM <DIR> updates
2 File(s) 3,013,803,088 bytes
5 Dir(s) 180,315,807,744 bytes free
===============================================================
Now... Follow these steps
- If you need to add some updates to original media Download the following updates from the Microsoft Update Catalog: KB2990941-v3, KB3087873-v2. Save *.MSU files to the directory
c:\tmp\updates
; - Download the NVMe driver for your controller and extract it to
c:\tmp\nvme
; - Slipstream the updates and the drivers to the boot WinPE image (boot.wim):
DISM /Get-WimInfo /WimFile:c:\tmp\boot.wim
DISM /Mount-Wim /WimFile:"C:\tmp\boot.wim" /Index:1 /MountDir:c:\tmp\mount
DISM /Image:c:\tmp\mount /Add-Package /PackagePath:C:\tmp\updates
DISM.exe /image:c:\tmp\mount /Add-Driver /driver:c:\tmp\nvme /recurse /ForceUnsigned
DISM /Unmount-Wim /MountDir:c:\tmp\mount /Commit - Run the same commands for the image with index 2 (on the second line, replace
/Index:1
with/Index:2
). - Now you need to integrate the update and the driver into the Windows installation image (install.wim). The image file can contain several versions of Windows 7 with different indexes. You can get a list of Windows versions with the command:
dism /Get-WimInfo /WimFile:c:\tmp\install.wim
Specify the index of the image to be updated (in our example it isIndex:2
)DISM /Get-WimInfo /WimFile:c:\tmp\install.wim
DISM /Mount-Wim /WimFile:"C:\tmp\install.wim" /Index:2 /MountDir:c:\tmp\mount
DISM /Image:c:\tmp\mount /Add-Package /PackagePath:C:\tmp\updates
DISM.exe /image:c:\tmp\mount /Add-Driver /driver:c:\tmp\nvme /recurse /ForceUnsigned
DISM /Unmount-Wim /MountDir:c:\tmp\mount /Commit