Update Driver Software from command prompt

6

2

I'm looking for a way to automatically install missing drivers on newly installed machines. All the machines are the same brand and model, so I created a shared folder that hass all the drivers in it. On the machine, I edit the following registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\DevicePath

By default, this value is %SystemRoot%\inf, but I changed this to %SystemRoot%\inf;\\SERVER\drvstr to also include my driver share.

Now, after the installation of Windows, A few drivers are missing as you can see in the picture. Weird, because it must search the drivers in my driver share (right?).

MissingDrivers

To try and fix this, I click Action, Scan for hardware changes. After a few seconds, I get the following information

enter image description here

it can't find my drivers. However, When I right click a missing device, and click on Update Driver Software, the driver gets installed. I Don't browse for the driver, I choose Search automatically for updated driver software and I'm doing this WITHOUT internet connection. So I'm pretty sure it's getting the driver from my driver share, right?

enter image description here

When I check the installed driver, it's indeed the driver from the share.

  • Why isn't the driver installed automatically?
  • Why doesn't device manager find the driver when I use 'Scan for hardware changes?'
  • Is there a way to automate this problem?

I've tried devcon.exe /rescan, but this doesn't even try to install the drivers. It does nothing so far I can see. I'm also not looking for third party software like Driver Genius. I Want to install the drivers, automatically, from the driver share that I maintain.

Thank you

Jente

Posted 2014-11-07T11:39:07.417

Reputation: 356

If this is being done straight after booting, it could be that the server path has not been initialised. Try accessing it from explorer then repeat Scan for hardware changes; or copying the server directory to the local disc and using that in the device path. – AFH – 2014-11-07T12:04:27.290

Accessing the drive from explorer and repeating the scan afterwards doesn't have any effect. No drivers are found. Copying the server directory to the local disc isn't convenient because it's more than 12GB of drivers. That would take to much time. – Jente – 2014-11-12T07:13:32.483

Try: PNPUTIL -a "C:\path\Driver.inf" as suggested by MAJIDE.

– kenorb – 2015-06-01T23:19:09.890

Answers

2

Have a look at this article :
Steps for Configuring a Shared Network Folder to Hold Signed Device Driver Packages.

One paragraph there limits enormously the usability of a network share as a repository for drivers, to the point of being almost useless :

A driver package hosted in a shared network folder must be properly signed with a certificate that is installed on the client computer, because it must still be staged in the driver store as part of the installation.

If the network share is the reason for this behavior, you will need to trick Windows into treating it as a local drive.

One trick that might work is to put the drivers in a VHD on the network share, then mount it as a local drive.
This can be done from the command-line by using Diskpart as follows :

diskpart
sel vdisk file="\NetworkLocation\ShareName\drivers.vhd"
attach vdisk

Another is to use a TrueCrypt folder, since I believe that a mounted TrueCrypt volume is treated as a local drive. Although this is a third-party software that you might prefer to avoid, you could use Portable TrueCrypt installed onto the same network share.

harrymc

Posted 2014-11-07T11:39:07.417

Reputation: 306 093

Created a symbolic link didn't work. Creating a .VHD did work! When I scan for the changes, the drivers are found on my .vhd that I attached to the machine. Thank you.

Rescanning with "devcon.exe /rescan" doesn't work however, it says 'scan completed', but nothing happens. – Jente – 2014-11-12T11:57:47.133

Tried devcon.exe again. If the 'Scan for hardware changes' option is available under the Action-Menu (of devmgmt.msc), it WILL find the drivers. Is that option isn't available, it won't find anything. – Jente – 2014-11-12T12:05:19.347

Thanks for the feedback; I deleted the symbolic link idea from the answer. – harrymc – 2014-11-12T12:22:04.967

Very useful information: I didn't know about the network drive signing issue. – AFH – 2014-11-12T12:36:18.303