VBS: a script to retrieve the wmi infos from computer : Manufacturer & Model
This script is in vbs and if you run it into under cmd you will just have to copy/past info to use it.
I am going to write an add-on to automatic model detection, with this script in beggining:
|
On Error Resume Next
Dim oWMIService, cObj, oObj, ObjFile here=left(WScript.ScriptFullName,len(WScript.ScriptFullName)-len(WScript.ScriptName)-1) CheckModelComputer()
End sub |
Now we want to update an ini file for sccm automatic driver deploiement.
Use this:
|
'// On Error Resume Next
Dim oWMIService, cObj, oObj, ObjFile
CheckModelComputer()
'This fonction give Manufacturer & Model of a computer by WMI QUERY
|
Run this script on all the computer you want and it will create a file named
ListModelesDrivers.ini on the same folder (if it does not exist) and append into this file the reference of the computer.
The nomenclature is manufacturer;model;argument
where argument is the argument you give in running the script in cdm like this:
cscript model.vbs “argument”
it is used by the script follow for sccm variable, that you assign to the drivers package to insall computer drivers:
|
'//
On Error Resume Next
Set ObjFile = CreateObject("Scripting.FileSystemObject")
|
when you have update your file ListModelesDrivers.ini update it into the package of modele.vbs.
your model reference is up to date
now you have to create the driver package for your new computer and add the variable define for this computer in condition of running the package in sccm
enjoy (5min)
/image%2F0881799%2F20140610%2Fob_a8c7fe_logo2.jpg)
Commenter cet article