Expand|Select|Wrap|Line Numbers
- strMsg = "This script will test the HardwareInfo object by reporting the values for the hardware info properties."
- strMsg = strMsg & " Please check the bios and computer properties to verify the tests. This test should be run on a "
- strMsg = strMsg & " variety of hardware platforms to verify it's successful operation."
- strMsg = strMsg & " Press OK to begin the tests."
- idResult = MsgBox (strMsg, VBOkCancel)
- If idResult = VBCancel Then wscript.quit
- Set objHardware = CreateObject ("icf.hardwareinfo")
- Call showem
- Set wargs = wscript.arguments
- If wArgs.count > 0 Then
- objHardware.computername = wargs (0)
- Call showem
- Else
- wscript.echo "Call script " & wscript.scriptfullname & " with a parameter to test collection from a remote machine."
- End If
- Set objHardware = nothing
- Sub ShowEm ()
- 'On Error Resume Next
- strMsg = ""
- strMsg = strMsg & vbcrlf & "===== Computer = " & objHardware.computername & " ====="
- strMsg = strMsg & vbcrlf & "Hardware Model = " & objHardware.Model
- strMsg = strMsg & vbcrlf & "Serial Number = " & objHardware.SerialNumber
- strMsg = strMsg & vbcrlf & "Type = " & objHardware.Type
- strMsg = strMsg & vbcrlf & "Asset Tag = " & objHardware.assetTag
- strMsg = strMsg & vbcrlf & "Manufacturer = " & objHardware.Manufacturer
- strMsg = strMsg & vbcrlf & "SuiteMask = " & objHardware.SuiteMask
- strMsg = strMsg & vbcrlf & "OSCSD = " & objHardware.OSCSD
- strMsg = strMsg & vbcrlf & "OSMajor = " & objHardware.OSMajor
- strMsg = strMsg & vbcrlf & "OSMinor = " & objHardware.OSMinor
- strMsg = strMsg & vbcrlf & "OSBuild = " & objHardware.OSBuild
- strMsg = strMsg & vbcrlf & "OsEx = " & objHardware.OsEx
- strMsg = strMsg & vbcrlf & "OSBootTime = " & objHardware.OSBootTime
- strMsg = strMsg & vbcrlf & "OSInstallTime = " & objHardware.OSInstallTime
- strMsg = strMsg & vbcrlf & "OSID = " & objHardware.OSID
- strMsg = strMsg & vbcrlf & "OSStr = " & objHardware.OSStr
- strMsg = strMsg & vbcrlf & "OSStrProductType = " & objHardware.OSStrProductType
- strMsg = strMsg & vbcrlf & "OSCurrentTimeZoneOffset = " & objHardware.OSCurrentTimeZoneOffset
- strMsg = strMsg & vbcrlf & "OSTimeZone = " & objHardware.OSTimeZone
- strMsg = strMsg & vbcrlf & "IPAddress = " & objHardware.IPAddress
- For each aDrive in objHardware.drives
- strMsg = strMsg & vbcrlf & "Drive " & adrive.letter & " size " & adrive.size & " mb Freespace " & adrive.freespace & " mb"
- Next
- wscript.echo strMSg
- End Sub