Tuesday, March 08, 2005

HP / Compaq Rib board detector

Get asked a lot if a server the other side of the world has a rib board installed..

This little script lets me know.

' Rib board detector.
' Scans list of servers for rib boards
' (c) 2005 Woosie

const HKEY_LOCAL_MACHINE = &H80000002
Const ForReading = 1, ForWriting = 2
Dim fso, MyFile, FileNam
Dim strComputer,TheLeft,TheDoctor
Set StdOut = WScript.StdOut
FileNam=InputBox ("Enter Target Server for RIB Board detection ?")
strcomputer = FileNam
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\" &_
strComputer & "rootdefault:StdRegProv")
strKeyPath = "SYSTEMCurrentControlSetEnumRootLEGACY_CPQRIB000"
strValueName ="DeviceDesc"
oReg.GetExpandedStringValue HKEY_LOCAL_MACHINE,strKeyPath,_
IF LEN(strValue)>4 then
msg=MsgBox("Rib board installed on " & strComputer)
msg=MsgBox("No rib board installed on " & strComputer)
end if

No comments: