'-----------------Memory Checker------------------------------------------
Dim objIE, objDoc, popDebug
popDebug = True
strComputer = "."
memType = array("Unknown","Other","DRAM","Synchronous DRAM","Cache DRAM","EDO","EDRAM","VRAM","SRAM","RAM","ROM","Flash","EEPROM","FEPROM","EPROM","CDRAM","3DRAM","SDRAM","SGRAM","RDRAM","DDR","DDR-2")
Set ObjWMI = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set ColItems = ObjWMI.ExecQuery("Select * from Win32_PhysicalMemory")
For Each Item in ColItems
pop("Memory Type: " & memType(Item.MemoryType))
pop("Slot: " & Item.DeviceLocator)
pop("Capacity: " & (Item.Capacity / 1048576) / 1024 & " GB")
pop("")
Next
function pop(strText)popDebug = True
strComputer = "."
memType = array("Unknown","Other","DRAM","Synchronous DRAM","Cache DRAM","EDO","EDRAM","VRAM","SRAM","RAM","ROM","Flash","EEPROM","FEPROM","EPROM","CDRAM","3DRAM","SDRAM","SGRAM","RDRAM","DDR","DDR-2")
Set ObjWMI = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set ColItems = ObjWMI.ExecQuery("Select * from Win32_PhysicalMemory")
For Each Item in ColItems
pop("Memory Type: " & memType(Item.MemoryType))
pop("Slot: " & Item.DeviceLocator)
pop("Capacity: " & (Item.Capacity / 1048576) / 1024 & " GB")
pop("")
Next
if popDebug = True then
if Not IsObject(objIE) then
Set objIE = wscript.CreateObject("InternetExplorer.Application")
objIE.Navigate "about:blank"
objIE.Visible = 1
objIE.ToolBar = False
objIE.Width = 400
objIE.Height = 500
Set objDoc = objIE.Document
objDoc.Open
'objDoc.Writeln "<HEAD><TITLE>Immediate Window - Debugger</TITLE></HEAD>"
end if
objDoc.Writeln strText & "<br/>"
end if
end function
'-----------------Memory Checker------------------------------------------
Enjoy,