Here is a script I just wrote some hours ago.
It detects the total amount of RAM within a computer anyway it's "kinda" faulty and detects 256MB sometimes as being 248MB (note: this is NOT a script bug but a windows bug)

FUNCTION GETCOMPUTERMEMORY ()
$BaseKey = "HKEY_LOCAL_MACHINE\Hardware\ResourceMap\System Resources\Physical Memory"
$RAMTranslated = RIGHT(READVALUE($BaseKey, ".Translated"), 8)
IF @ERROR=0
$RAMAmount = (VAL("&"+RIGHT($RAMTranslated,2)+SUBSTR($RAMTranslated,5,2))+250+16)/16
IF ($RAMAmount mod 2)=1
$RAMAmount = $RAMAmount+1
ENDIF
$GETCOMPUTERMEMORY = ""+$RAMAmount+" MB"
ENDIF
ENDFUNCTION

UPDATE: Code got fixed, should now work even till some TBs.

Regards
M. Kiewitz



Edited by M_Kiewitz (2005-02-16 06:28 PM)