'Script Start
Set obj = GetObject("winmgmts:").InstancesOf("Win32_PhysicalMemory")
i = 1
For Each obj2 In obj
memTmp1 = obj2.capacity / 1024 / 1024
wscript.echo "Module" & i & ": " & memTmp1 & " MB"
TotalRam = TotalRam + memTmp1
i = i +1
Next
wscript.echo "Total RAM: " & TotalRam & " MB"
'Script End
How to execute a VBScript
No comments:
Post a Comment