Radimus
(KiX Supporter)
2002-08-23 02:51 PM
Here is a script to determine memory size and each Dimm

Requires WMIQuery()

I didn't use an array to grab the individual dimms due to issues in printing array values and/or using them in strings...

code:
	$memory=0	$dimm0=0	$dimm1=0	$dimm2=0	$dimm3=0
$dimms=Split(WMIQuery("Capacity","Win32_PhysicalMemory"),"|")
for $a=0 to ubound($dimms)
$=execute("$$dimm$a=val($$dimms[$a]) / 1048576")
$=execute("$$memory=$$Memory+$$dimm$a")
next
? "$memory $dimm0 $dimm1 $dimm2 $dimm3"



[ 23. August 2002, 14:54: Message edited by: Radimus ]


uberpaco
(Fresh Scripter)
2002-08-23 03:22 PM
Re: Here is a script to determine memory size and each Dimm

Thanx, works like a charm for me

Borte
(Fresh Scripter)
2002-08-23 10:11 PM
Re: Here is a script to determine memory size and each Dimm

I've have had some problems using this function.
(Using the same code as above)

On our computers with 1GB of ram (4 dimms) and 2 prosessors, it only shows up the dimm in socket 2, 3 and 4 not the one in the first socket.

Why i don't know!
Any suggestions would be apreciated!


Radimus
(KiX Supporter)
2002-08-23 10:33 PM
Re: Here is a script to determine memory size and each Dimm

try outputting $dimm4, $dimm5 and see if there is anything there