User Tools

Site Tools


windows:get_total_ram

This is an old revision of the document!


Get Total Ram

total_ram.vbs
strComputer = "." 
 
Set objWMI = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _ 
& strComputer & "\root\cimv2") 
Set colComputer = objWMI.ExecQuery _
("Select * from Win32_ComputerSystem") 
 
For Each objComputer in colComputer 
total_mem = objComputer.TotalPhysicalMemory / 1024 / 1024
windows/get_total_ram.1366397656.txt.gz · Last modified: 2013/04/19 13:54 by tschulz