QC20N
asked on
Hardware inventory collection
Could someone help me to add option to this vbs script. What I like to have added is harddrive size, videocard type. The script was made by BobSampson.
https://www.experts-exchange.com/questions/22585270/WMI-hardware-inventory.html?sfQueryTermInfo=1+hardwar+script+wmi
https://www.experts-exchange.com/questions/22585270/WMI-hardware-inventory.html?sfQueryTermInfo=1+hardwar+script+wmi
ASKER
I can see in the txtfile that it collects:
Video Controller:
ConfigMgr Remote Control Driver
and not the name of the videocard.
And I would also, ask if the Combine hardware script in the same link can be used with this you are doing now?
Video Controller:
ConfigMgr Remote Control Driver
and not the name of the videocard.
And I would also, ask if the Combine hardware script in the same link can be used with this you are doing now?
Hi, so that I can determine how to read your Video Card name, please run the following code and let me know the results.
Regards,
Rob.
Regards,
Rob.
If LCase(Right(Wscript.FullName, 11)) = "wscript.exe" Then
strPath = Wscript.ScriptFullName
strCommand = "%comspec% /c cscript """ & strPath & """"
Set objShell = CreateObject("Wscript.Shell")
objShell.Run(strCommand), 1, True
Wscript.Quit
End If
Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_VideoController", "WQL", _
wbemFlagReturnImmediately + wbemFlagForwardOnly)
For Each objItem In colItems
WScript.Echo "Caption: " & objItem.Caption
WScript.Echo "Description: " & objItem.Description
WScript.Echo "DeviceID: " & objItem.DeviceID
WScript.Echo "DriverVersion: " & objItem.DriverVersion
WScript.Echo "InfFilename: " & objItem.InfFilename
WScript.Echo "InstalledDisplayDrivers: " & objItem.InstalledDisplayDrivers
WScript.Echo "Name: " & objItem.Name
WScript.Echo "PNPDeviceID: " & objItem.PNPDeviceID
WScript.Echo "SystemName: " & objItem.SystemName
WScript.Echo "VideoArchitecture: " & objItem.VideoArchitecture
WScript.Echo "VideoMemoryType: " & objItem.VideoMemoryType
WScript.Echo "VideoMode: " & objItem.VideoMode
WScript.Echo
Next
And yes, the "combine" of the text files script can be used as well.
Regards,
Rob.
Regards,
Rob.
ASKER
Sorry to say. If I run the code a dos prompt shows and disappear again. Can't see the result.
Sorry....see this bit
%comspec% /c
change that to
%comspec% /k
and then run it again....
Rob.
%comspec% /c
change that to
%comspec% /k
and then run it again....
Rob.
ASKER
This is the result:
Caption: ConfigMgr Remote Control Driver
Description: ConfigMgr Remote Control Driver
DeviceID: VideoController1
DriverVersion: 4.00.6163.1000
InfFilename: oem23.inf
InstalledDisplayDrivers: ialmrnt5.dll
Name: ConfigMgr Remote Control Driver
PNPDeviceID: ROOT\*CM_RCDISPLAY\0000
SystemName: DKSODT0470
VideoArchitecture: 5
VideoMemoryType: 2
VideoMode:
Caption: Intel(R) 82945G Express Chipset Family
Description: Intel(R) 82945G Express Chipset Family
DeviceID: VideoController2
DriverVersion: 6.14.10.4543
InfFilename: oem6.inf
InstalledDisplayDrivers: ialmrnt5.dll
Name: Intel(R) 82945G Express Chipset Family
PNPDeviceID: PCI\VEN_8086&DEV_2772&SUBS YS_01AD102 8&REV_02\3 &172E68DD& 0&10
SystemName: DKSODT0470
VideoArchitecture: 5
VideoMemoryType: 2
VideoMode:
Caption: Intel(R) 82945G Express Chipset Family
Description: Intel(R) 82945G Express Chipset Family
DeviceID: VideoController3
DriverVersion: 6.14.10.4543
InfFilename: oem6.inf
InstalledDisplayDrivers:
Name: Intel(R) 82945G Express Chipset Family
PNPDeviceID: PCI\VEN_8086&DEV_2776&SUBS YS_01AD102 8&REV_02\3 &172E68DD& 0&11
SystemName: DKSODT0470
VideoArchitecture: 5
VideoMemoryType: 2
VideoMode:
Caption: ConfigMgr Remote Control Driver
Description: ConfigMgr Remote Control Driver
DeviceID: VideoController1
DriverVersion: 4.00.6163.1000
InfFilename: oem23.inf
InstalledDisplayDrivers: ialmrnt5.dll
Name: ConfigMgr Remote Control Driver
PNPDeviceID: ROOT\*CM_RCDISPLAY\0000
SystemName: DKSODT0470
VideoArchitecture: 5
VideoMemoryType: 2
VideoMode:
Caption: Intel(R) 82945G Express Chipset Family
Description: Intel(R) 82945G Express Chipset Family
DeviceID: VideoController2
DriverVersion: 6.14.10.4543
InfFilename: oem6.inf
InstalledDisplayDrivers: ialmrnt5.dll
Name: Intel(R) 82945G Express Chipset Family
PNPDeviceID: PCI\VEN_8086&DEV_2772&SUBS
SystemName: DKSODT0470
VideoArchitecture: 5
VideoMemoryType: 2
VideoMode:
Caption: Intel(R) 82945G Express Chipset Family
Description: Intel(R) 82945G Express Chipset Family
DeviceID: VideoController3
DriverVersion: 6.14.10.4543
InfFilename: oem6.inf
InstalledDisplayDrivers:
Name: Intel(R) 82945G Express Chipset Family
PNPDeviceID: PCI\VEN_8086&DEV_2776&SUBS
SystemName: DKSODT0470
VideoArchitecture: 5
VideoMemoryType: 2
VideoMode:
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Regards,
Rob.
Open in new window