Windows – Update Driver Software from command prompt

cmd.exedevice managerdriverspowershellwindows 7

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

Best Answer

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.