我正试图想办法扫描所有设备(没有安装驱动程序)并自动逐个安装。
我已经制作了一个简单的脚本来添加/删除驱动程序位置的注册表值,因为我们有一个服务器包含所有当前驱动程序并且它经常更新,所以不是手动将设备管理器指向该位置而是脚本执行此操作为了我。 问题是我们在生产环境中工作,我们有很多不同的设备要安装,手动操作需要太长时间,即使脚本我必须单击每个设备并更新驱动程序,脚本只是让它更容易一些通过驱动程序将其指向服务器。
所以基本上我试着让脚本添加位置(这可以正常使用ATM)并且它们在不提示用户的情况下更新每个设备。
Option Explicit
Set ws = WScript.CreateObject("WScript.Shell")
Dim s, ws, rl
rl = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\"
s = InputBox("Please select what you want to do" & _
vbCrLf & vbTab & "1 - Clear all, set default driver path." & _
vbCrLf & vbTab & "2 - Default path + production drivers" & _
vbCrLf & vbTab & "3 - Default and production path + Skylake drivers")
If s = 1 then
ws.RegWrite rl & "DevicePath", "%SystemRoot%\inf" , "REG_EXPAND_SZ"
ElseIf s = 2 then
ws.RegWrite rl & "DevicePath", "%SystemRoot%\inf; B:\LocalDrivers\; \\ccdsrv01\shares\Resources\Drivers\Client" , "REG_EXPAND_SZ"
ElseIf s = 3 then
ws.RegWrite rl & "DevicePath", "%SystemRoot%\inf; B:\LocalDrivers\; \\ccdsrv01\shares\Resources\Drivers\Client; \\ccdsrv01\shares\Resources\PreProd\SkyBay (Skylake-SunrisePoint)\New" , "REG_EXPAND_SZ"
End If