1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| strComputer = "."
Dim WshNetwork
Set WshNetwork = CreateObject("WScript.Network")
ComputerName = WshNetwork.ComputerName
Dim Prefix, PrefixMatch
Prefix = LCase(Left(ComputerName, 4))
PrefixMatch = (Prefix = "001-")
'Bios
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_BIOS",,48)
For Each objItem in colItems
strSvcTag = objItem.SerialNumber
Next
If PrefixMatch and (strSvcTag = "H65MPJ8") Or (strSvcTag = "H76MLQ1") Then
Wscript.Echo "Yes"
wscript.echo ComputerName
wscript.echo strSvcTag
Else
Wscript.Echo "No"
End If |