Expert Software Company : News

miercuri, 19 mai 2010

Informatii Calculator

*WAIT WINDOW GetEnv("USERDOMAIN") = GETWORDNUM(SYS(0),1)

CLEAR

*!* Let's get the Free Physical Memory of local machine in KB
LOCAL loWMIService, loItems, loItem
loWMIService = GETOBJECT("winmgmts:\\.")
loItems = loWMIService.ExecQuery("Select * from Win32_OperatingSystem")
FOR EACH loItem IN loItems
? int(val(loItem.FreePhysicalMemory))
ENDFOR
*!* Let's get the CPU ID
LOCAL lcComputerName, loWMI, lowmiWin32Objects, lowmiWin32Object
lcComputerName = GETWORDNUM(SYS(0),1)
loWMI = GETOBJECT("WinMgmts://" + lcComputerName)
lowmiWin32Objects = loWMI.InstancesOf("Win32_Processor")
FOR EACH lowmiWin32Object IN lowmiWin32Objects
WITH lowmiWin32Object
? "ProcessorId: " + TRANSFORM(.ProcessorId)
ENDWITH
ENDFOR

?
?

*!* Let's get the MAC Address(es)
LOCAL lcComputerName, loWMIService, loItems, loItem, lcMACAddress
lcComputerName = "."
loWMIService = GETOBJECT("winmgmts:\\" + lcComputerName + "\root\cimv2")
loItems = loWMIService.ExecQuery("Select * from Win32_NetworkAdapter",,48)
FOR EACH loItem IN loItems
lcMACAddress = loItem.MACAddress
IF !ISNULL(lcMACAddress)
? "MAC Address: " + loItem.MACAddress
?
ENDIF
ENDFOR

?
?

*!* Let's get the Volume Serial Number(s)
LOCAL lcComputerName, loWMIService, loItems, loItem, lcVolumeSerial
lcComputerName = "."
loWMIService = GETOBJECT("winmgmts:\\" + lcComputerName + "\root\cimv2")
loItems = loWMIService.ExecQuery("Select * from Win32_LogicalDisk")
FOR EACH loItem IN loItems
lcVolumeSerial = loItem.VolumeSerialNumber
IF !ISNULL(lcVolumeSerial)
? "Name: " + loItem.NAME
? "Volume Serial Number: " + loItem.VolumeSerialNumber
?
ENDIF
ENDFOR

?
?

loWMIService = GETOBJECT("winmgmts:\\.")
loItems = loWMIService.ExecQuery("Select * from Win32_Processor")
*colItems = objWMIService.ExecQuery("Select * FROM Win32_Processor", 48)

For Each objItem In loItems
? objItem.Name
? ObjItem.CurrentClockSpeed

Next

Niciun comentariu:

Trimiteți un comentariu