[THIN] Re: OT: WMI - Installed Memory vs Available Memory

  • From: Steve Snyder <kwajalein@xxxxxxxxx>
  • To: thin@xxxxxxxxxxxxx
  • Date: Fri, 10 Feb 2012 08:39:02 +0100

Sweet!

I saw the physicalMemory/Capacity but only got 2GB out of it so I assumed
it was just the max size DIMM the system was capable of as my script editor
just tells me "The total capacity of this physical memory, in bytes."
Didn't realize it was per installed DIMM.

Thanks!

On Fri, Feb 10, 2012 at 8:29 AM, Jeremy Saunders <
jeremy@xxxxxxxxxxxxxxxxxxxx> wrote:

> Yep, that’s happened to me before, so I use Win32_PhysicalMemory to get
> the real number.****
>
> ** **
>
> strComputer = "."****
>
> Set objWMIService = GetObject("winmgmts:" &
> "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")****
>
> Set colItems = objWMIService.ExecQuery("SELECT * FROM
> Win32_PhysicalMemory", "WQL", _****
>
>   wbemFlagReturnImmediately + wbemFlagForwardOnly)****
>
> intTotalPhysicalMemory = 0****
>
> For Each objItem In colItems****
>
>   intMemory = ((objItem.capacity) / 1024) / 1024****
>
>   intTotalPhysicalMemory = intTotalPhysicalMemory + intMemory****
>
> Next ****
>
> wscript.echo "Total Physical Memory Installed : " & intTotalPhysicalMemory
> & " Mb"****
>
> ** **
>
> Cheers,****
>
> Jeremy.****
>
> ** **
>
> *From:* thin-bounce@xxxxxxxxxxxxx [mailto:thin-bounce@xxxxxxxxxxxxx] *On
> Behalf Of *Steve Snyder
> *Sent:* Friday, 10 February 2012 3:05 PM
> *To:* thin@xxxxxxxxxxxxx
> *Subject:* [THIN] OT: WMI - Installed Memory vs Available Memory****
>
> ** **
>
> Ok,
>
> Right-click on My Computer, select properties and look at the memory
> listed, probably something like 4.00GB. Now bring up taskman and on the
> Performance tab look at Physical Memory: Total. mine is 3324MB.
>
> What WMI string do I use to see the installed memory as listed on the
> system properties? Win32_ComputerSystem/TotalPhysicalMemory gives me the
> available physical memory as reported in taskman.****
>

Other related posts: