How to get the RAM Size of the computer using QTP/VbScript?
strComputer = "."
Set objWMIService = GetObject("winmgmts:"& "{impersonationLevel=impersonate}!\\"&
strComputer & "\root\cimv2")
Set colPC = objWMIService.ExecQuery("Select * from Win32_ComputerSystem")
For Each objPC in colPC
msgbox Round(objPC.TotalPhysicalMemory/(1024*1024*1024),3)
Next
No comments:
Post a Comment