Hi Sally,
We use a WMI query from within the automation environment to detect the hardware and then use that to copy down the appropriate driver set to the client. Below is an example on how we do this.
Please note, for the driver installation part, I use DPInst with a set of parameters and simply execute the same command twice so that the controller and ports get installed. For your reference, I also pasted in the DPInst command line I use.
As I'm not a programmer, the code might be looking stupid or not the best, but works. And it is used by copying the VBS to the client and executing it locally.
Maybe this was of some help for you?
-BBC
DPInst:
START /W %~d0%~P0%DPInst.exe /c /el /lm /q /sa /se /sh /sw
Driver selection and copy script:
'vbScript
'This script is to identify the model name of the computer and
'copy across according drivers
Dim oFSO, oFS, MyModel, MySource, MyDest, MyCMD, MyWork
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set WshShell = wScript.CreateObject("wScript.Shell")
strComputer = "."
MySource = "G:\DSLIB\Global\Drivers\WIN\Win7\"
MyDest = "C:\DisneyIT\Tools\Packages\*.* /s /e /y"
'Create Output File
'Set oTSOut = oFSO.CreateTextFile("C:\DisneyIT\Product.txt")
'Setup WMI query Computer Syetem Product Properties for Name and Version
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystemProduct",,48)
'Query the local system
For Each objItem in colItems
If objItem.Vendor = "LENOVO" Then
'oTSOut.WriteLine objItem.Version
MyModel = rTrim(objItem.Version)
MySource = MySource & "IBM\" & MyModel
MySource = MySource & "\*.*"
MySource = CHR(34) & MySource & CHR(34)
MyCMD = "CMD /C XCOPY "
MyWork = MySource & " " & MyDest
WshShell.Run MyCMD & MyWork
ElseIf objItem.Vendor = "Dell Inc." Then
'oTSOut.WriteLine objItem.Version
MyModel = rTrim(objItem.Name)
MySource = MySource & "DELL\" & MyModel
MySource = MySource & "\*.*"
MySource = CHR(34) & MySource & CHR(34)
MyCMD = "CMD /C XCOPY "
MyWork = MySource & " " & MyDest
WshShell.Run MyCMD & MyWork
Else
'oTSOut.WriteLine objItem.Name
MyModel = rTrim(objItem.Name)
MySource = MySource & "HP\" & MyModel
MySource = MySource & "\*.*"
MySource = CHR(34) & MySource & CHR(34)
MyCMD = "CMD /C XCOPY "
MyWork = MySource & " " & MyDest
WshShell.Run MyCMD & MyWork
End If
Next
Set oFS = Nothing