Update a driver on the command line

From The IT Community
Jump to: navigation, search

Sometimes it can be usefull to update a driver using a batch file, either because you want a very small driver package (without having to run setup.exe) or because your OSD refuses to use the driver you want it to use.

Here is how to update a driver on the command line:

  • The only file you need from the kit is devcon.exe, so search for it and copy it to an usb key.
  • On a machine you want to change the driver issue the following command in a cmd (as administrator):
devcon drivernodes * > drivers.txt
  • Search for the device you want to update to get the hardware ID.
  • create a batch file in the root of your driver package (containing the .inf file) that looks like this:
devcon updateni <inf> <hwid>

where <inf> is the .inf file of your driver and <hwid> is the hardware ID you found.

For example:

devcon updateni "driver.inf" "PCI\VEN_8086&DEV_24D5&SUBSYS_80F31043&REV_02"

You may have to reboot to see the changes.

When you use this in OSD, create a package with all the content (driver files, devcon.exe, batch file) and run it from your task sequence.

Was this article helpful? Then please donate to keep The IT Community alive...

If you found this article helpful please share it, comment and help others by writing your own article.

Translate this page:

Articles found in the same category:
(max. 20 shown)