Skip to content

Instantly share code, notes, and snippets.

@TomCan
Last active June 13, 2025 10:58
Show Gist options
  • Save TomCan/9644966 to your computer and use it in GitHub Desktop.
Save TomCan/9644966 to your computer and use it in GitHub Desktop.
Inject drivers in Windows installation after motherboard change
Today, after working with Windows for over 15 years now, I finally came across the solution to the
dreadfull BSOD STOP 0x0000007B after replacing the motherboard of a computer, or after moving the
harddrive to another computer, or after doing a P2V, or after ... you get the point.
Requirements:
- Windows install / boot CD
- Chipset / Mobo / Storage drivers of the new motherboard or storage controller
Steps:
- extract all the drivers to a USB thumb drive
- boot with the Windows CD
- go to the recovery console (typically hidden somewhere under repair, or advanced tools
- find out what drive letter your windows installation is in (probably C:) and what drive letter your
USB thumb drive is in (let's assume D:)
- type in the magic command:
DISM /Image:C:\ /Add-Driver /driver:D:\ /recurse
- wait until the process completes. You should see lines indicating what driver is being injected
- reboot
After rebooting, you should be able to boot into windows (if the boot menu for start-up repair shows,
just select the option to boot Windows normally). Once booted, Windows will probably install some more
drivers and you will probably need to reboot once more. There's also a chance that you'll need to
re-activate your Windows.
@wverdi
Copy link

wverdi commented Nov 13, 2024

Thank you so much

@winampdevil
Copy link

Thank you!!!
Scenario:

  • doing a BareMetalRestore from HP z420 to HP Z2 G9
  • Windows will start, if VMD in Bios is disabled. In Windows, you can also install all HP-driver. Excluding the VMD-driver, because there is no hardware enabled.
  • Windows runs into BSOD, if VMD in Bios is enabled
  • after a lot of headache, i found this post, which saved my weekend ;)
  • now i've a nvme-raid and i'm happy

@magi44ken
Copy link

Unfortunally i have Error 87 and the process end. any workaround?

Can you provide a screenshot or at least all of the text from the error message? Context is very important, and the error message text can convey a lot more information than just the error number.

I'm also getting the exact error 87. When I do dism /?, the add-driver and add-package option is not listed. I'm on Windows 11 24H2.

Below is the full error message.

PS C:\Users\Admin> Dism /Image:"F:\z2\zMount" /Add-Driver /Driver:"F:\z2\2Drivers-Boot" /Recurse

Deployment Image Servicing and Management tool
Version: 10.0.26100.1150

Image Version: 10.0.19041.1288

Error: 87

The add-driver option is unknown.
For more information, refer to the help by running DISM.exe /?.

The DISM log file can be found at C:\Windows\Logs\DISM\dism.log

@1Technologist
Copy link

This aboslutely saved my ass. Saving this for fututre reference. THANK YOU,

@DEADSOLDIERtr
Copy link

Hello, I just opened an account to ask for help.

I have downloaded Windows 11 to my Acer Nitro v15-51 without VMD.

VMD was a hassle, and because I don't understand, I just disabled VMD.

But when a new bios update comes, it opens VMD automatically, so I get a blue screen, and I have to open the boot menu to close VMD again.

Now, I want to enable VMD, but because the OS was installed without the VMD driver, it doesn't start with the option on. Even after downloading VMD driver and installing it in the OS.

I guess I had to install the driver in the setup screen.

I'm 80% sure the answer to my problem is here, injecting the driver.
But because I don't understand anything about this topic, can someone explain it to me?

I literally need an explanation on a toddler level. (T_T)
Thank you in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment