Add drivers to driver store in windows
Creating a win 7 image.Have some drivers I wanted to add to the driver store.
Can not just paste them into %SystemRoot%\INF because Windows deletes it.
How can you add it?
use PNPUTIL.exe which is included as part of win7.example : pnputil /a c:lenovo\NICDriver.inf would add a nic driver.
What if you have many drivers??
That is kind of not fun if you need to add the drivers for 5 different models.You can place them in one directory, and then use this script that Alexander Stein placed on github.
Thanks Alexander!
https://gist.github.com/ajstein/1021553
note: you are going to get unsigned driver warnings and will have to OK them.
There is a way to sign the drivers if you would like, but I didn't really look into that since I only had a few to do.
@ECHO OFF
IF "%1" == "" GOTO ERROR
ECHO.
ECHO Checking dir %1 recursively for drivers.
ECHO.
FOR /F "tokens=*" %%D IN ('DIR /B /AD /S %1') DO PNPUTIL -a "%%D\*.inf" 2>&1 >> %WinDir%\system32\driverimport.log
GOTO EOF
:ERROR
ECHO Missing argument! Must include QUOTED directory path!
ECHO %0 "C:\path\to\driver\folder\"
:EOF
0 comments:
Post a Comment