The latest generic NVMe driver available for Windows 7 SP1 and Windows Server 2008 R2 SP1 can be extracted from KB3125574 (Convenience rollup update).
Only 4 files are needed to have NVMe support in Windows 7 SP1 RTM / Server 2008 R2 SP1 RTM:
stornvme.inf & stornvme.sys (this is the actual driver)
Classpnp.sys & storport.sys (stornvme.sys requires the updated version)
I was able to integrate those 4 files into WinPE 3.0 x64.
Once booted into WinPE 3.0 with NVMe support, I have started the Windows 7 setup and it was able to install Windows directly to the NVMe disk - I have used the original Windows 7 SP1 / Server 2008 R2 SP1 installation media (mounted from a network share).
The Windows 7 setup detected the stornvme.sys driver used by WinPE and copied it to 'C:\Windows\system32\drivers'.
After the copy phase of the setup finished ('setup.exe /noreboot' is helpful) I had to copy the updated Classpnp.sys & storport.sys to 'C:\Windows\system32\drivers'.
And that's it - both Windows 7 and Server 2008 were able to complete the installation directly to the NVMe drive.
This is the script I used to create WinPE 3.0 x64 with NVMe support (You will need the Windows 7 Automated Installation Kit):
Dism /Mount-Wim /WimFile:"C:\WinPE_amd64\winpe.wim" /index:1 /MountDir:"C:\WinPE_amd64\mount"
Dism /image:"C:\WinPE_amd64\mount" /Add-Driver /Driver:"C:\Drivers\NVMe\Windows 7 x64" /ForceUnsigned
copy "C:\Drivers\NVMe\Windows 7 x64\Dependencies\Classpnp.sys" "C:\WinPE_amd64\mount\Windows\System32\drivers\Classpnp.sys" /y
copy "C:\Drivers\NVMe\Windows 7 x64\Dependencies\storport.sys" "C:\WinPE_amd64\mount\Windows\System32\drivers\storport.sys" /y
Dism /Unmount-Wim /MountDir:"C:\WinPE_amd64\mount" /commit
move "C:\WinPE_amd64\winpe.wim" "C:\WinPE_amd64\ISO\sources\boot.wim"
oscdimg -m -o -u2 -udfver102 -bootdata:2#p0,e,bc:\WinPE_amd64\etfsboot.com#pEF,e,bc:\WinPE_amd64\efisys.bin c:\WinPE_amd64\ISO c:\WinPE_amd64\winpeuefi.iso
Note that support for both BIOS and UEFI was added.
Note:
The 'C:\Drivers\NVMe' content is as follows:
C:\Drivers\NVMe\Windows 7 x64\stornvme.inf
C:\Drivers\NVMe\Windows 7 x64\stornvme.sys
C:\Drivers\NVMe\Windows 7 x64\Dependencies\Classpnp.sys
C:\Drivers\NVMe\Windows 7 x64\Dependencies\storport.sys
You can download the final WinPE 3.0 x64 with NVMe support ISO from here: