All you have to do to use this method (I'm sure there are other methods, but this is how I use it):
- Download the attached .rar
- Extract devcon.exe and grep.exe to $OEM$\$$\system32, DriverInstall.exe to $OEM$\$1\Drivers
- In RunOnceEx.cmd, add driver checks such as:
CODE
devcon hwids =Display | grep Name: | grep -i GeForce > NUL
IF NOT ERRORLEVEL 1 (
)
IF NOT ERRORLEVEL 1 (
)
- Inside the IF ( ) block, invoke DriverInstaller with the relevant switches (for information about the switches that DriverInstaller supports, read about Commands for DevCon Operations), such as:
CODE
%systemdrive%\Drivers\DriverInstall.exe update %systemdrive%\Drivers\002_graphics\NVIDIA\2KXP_INF\NV_OMEGA_DISP.INF PCI\VEN_10DE
A brief breakdown about the DriverInstaller line above:
%systemdrive%\Drivers\DriverInstall.exe: The path to DriverInstaller.exe
update: Update the driver (as opposed to install, disable, enable, etc)
%systemdrive%\Drivers\002_graphics\NVIDIA\2KXP_INF\NV_OMEGA_DISP.INF: Path to the .inf for the drivers you wish to update
PCI\VEN_10DE: The hardware vendor ID. You must get this from inside the driver's .inf
Completed, my RunOnceEx.cmd looks something like:
CODE
devcon hwids =Display | grep Name: | grep -i GeForce > NUL
IF NOT ERRORLEVEL 1 (
REG ADD %KEY%\325 /VE /D "NVIDIA ForceWare 56.72 video drivers" /f
REG ADD %KEY%\325 /V 1 /D "%systemdrive%\Drivers\DriverInstall.exe update %systemdrive%\Drivers\002_graphics\NVIDIA\2KXP_INF\NV_OMEGA_DISP.INF PCI\VEN_10DE" /f
)
IF NOT ERRORLEVEL 1 (
REG ADD %KEY%\325 /VE /D "NVIDIA ForceWare 56.72 video drivers" /f
REG ADD %KEY%\325 /V 1 /D "%systemdrive%\Drivers\DriverInstall.exe update %systemdrive%\Drivers\002_graphics\NVIDIA\2KXP_INF\NV_OMEGA_DISP.INF PCI\VEN_10DE" /f
)
I've tested this to work with signed drivers, unsigned drivers, drivers with multiple prompts, and it has worked each time.
Any questions/comments, feel free to let me know. Hope this helps someone as much as it helped me.