Page 1 of 1 1
Topic Options
#69380 - 2002-08-23 02:51 PM Here is a script to determine memory size and each Dimm
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
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 ]
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#69381 - 2002-08-23 03:22 PM Re: Here is a script to determine memory size and each Dimm
uberpaco Offline
Fresh Scripter

Registered: 2002-08-02
Posts: 21
Thanx, works like a charm for me
Top
#69382 - 2002-08-23 10:11 PM Re: Here is a script to determine memory size and each Dimm
Borte Offline
Fresh Scripter

Registered: 2002-08-20
Posts: 29
Loc: Europe / Norway
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!

Top
#69383 - 2002-08-23 10:33 PM Re: Here is a script to determine memory size and each Dimm
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
try outputting $dimm4, $dimm5 and see if there is anything there
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 156 anonymous users online.
Newest Members
diefnet, Arogya, gkustra, emnipetro, Hirze
17644 Registered Users

Generated in 0.029 seconds in which 0.012 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org