M Kiewitz: I hacked on your function, dimming the variables, removing the MB so that it just returns a number, and adding the option for checking remote pcs. Once everyone has tested this, you might consider adding your function to the UDF forum.
Code:
FUNCTION GETCOMPUTERMEMORY (optional $target)
Dim $Basekey,$RAMTranslated
If $Target <> ''
$Target = IIf(Left($Target, 2) <> '\\', '\\' + $Target, $Target)
$Target = IIf(Right($Target, 1) <> '\', $Target + '\', $Target)
EndIf
$BaseKey =$target + "HKEY_LOCAL_MACHINE\Hardware\ResourceMap\System Resources\Physical Memory"
$RAMTranslated = RIGHT(READVALUE($BaseKey, ".Translated"), 8)
IF @ERROR=0
$GetComputerMemory = (VAL("&"+RIGHT($RAMTranslated,2)+SUBSTR($RAMTranslated,5,2))+250+16)/16
IF ($GetComputerMemory mod 2)=1
$GetComputerMemory = $GetComputerMemory+1
ENDIF
ENDIF
ENDFUNCTION