I am working on re-imaging some older machines. The process is down to a science, and the latest drivers from the manufacturer are injected after the imaging, automatically. I'm happy with this process!
However, on certain models, the Touchpad driver needs to be updated from Windows Update to prevent an error message from popping up for users. I can manually go into Device Manager, expand Pointing Devices, right-click the Touchpad, and choose Update Driver. It finds the driver online, installs it, then reboots. Error message gone!
However, I have lots of these systems, and I do not want to do more clicking that necessary. I have the means to deploy Powershell or CMD commands remotely, and I'd like to find a way to get the latest driver for the particular hardware device from Windows Update, automatically.
Best Answer
So, if I have understood correctly:
I recommend doing this using these two stages.
Stage one: Get the TouchPad driver
This is easy and straightforward. Updates that Microsoft usually propagates through Windows Update are also available on Microsoft Update Catalog website at:
... and this includes device drivers. Search for the drivers you need to install and download it. You'll end up with a .cab file.
Stage two: Inject them
To an offline OS
The question indicates there is OS imaging at work. Hence, I believe it is easier to add the driver (in this case a TouchPad driver) to the images, if those images are .wim images or there is offline access to the OS before being imaged.
Having acquired the driver(s) from Microsoft Update Catalog, place the .cab file(s) of the driver(s) into a folder, e.g. "
C:\Test\Drivers
", and extract the .cab file(s). The content of each .cab file should go into a subfolder. Then, open Windows PowerShell and useAdd-WindowsDriver
command to inject the driver(s) to the Windows image.You might want to update your Windows PowerShell to 5.1 if you are not on Windows 10. Also, you might want to install the latest version of Deployment Tools instead of just using the one that comes with Windows. Deployment Tools are included in Windows Assessment and Deployment Toolkit. Download the online installer (adksetup.exe) which 2 MB. Run it and select Deployment Tools only. It is a 90 MB download.
Now, to add the driver(s) placed in
C:\test\drivers
as described above, to an offline Windows image mounted onc:\offline
, issue the following command in Windows PowerShell:Let's modify it slightly: The OS which you want to image is offline, and you have access to it. For instance, the hard disk of the system which is now the subject of imaging is physically mounted on this computer and its OS partition is D:. Or, it is already imaged into a VHD file, the VHD file is mounted and the OS partition is now D:. Issue the following command in Windows PowerShell:
Add-WindowsDriver
at https://docs.microsoft.com/en-us/powershell/module/dism/add-windowsdriver?view=win10-psTo an online OS
Update: Microsoft has pulled off all prose regarding the use of Windows PowerShell to add a driver to a live Windows. So, I went ahead and tried it: It was wrong. Hence, I am updating this answer to introduce a new way.
Having acquired the driver from Microsoft Update Catalog, extract the driver's .cab file. It contains at least one .inf file.
Run
InfDefaultInstall.exe
to point to their corresponding .inf file. For example, I received a device driver that had anetmosu.inf
. So, I changed to its folder and run:On Windows 8.1 and 10, this installs the driver even if device is not present and the driver is not needed. Now, you add the device any time you want and just use it. On Windows 7, this does not work.
Update a live system, before imaging it
The techniques above is about updating an OS image either during imaging, after imaging or after deployment of the image when the OS goes live. Why not before all this?
A well-known technique is to install Windows on a system, update everything on it (including all drivers) and then run
sysprep
utility on it. The hard disk of this computer can now be imaged and deployed to similar systems.