#133845 - 2005-02-23 09:12 PM
Re: Detect amount of RAM / memory
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11628
Loc: CA
|
Al and M Kiewitz,
I've made some other minor modifications to the code as well and will try them out on 3GB system in a few minutes. Here at home so have to login to work to test.
Function GetComputerMemory(optional $sComputer) Dim $Basekey,$RAMTranslated $BaseKey = 'HKLM\Hardware\ResourceMap\System Resources\Physical Memory' If Not $sComputer $sComputer = @WKSTA Else $BaseKey = '\\' + $sComputer + '\' + $BaseKey EndIf $RAMTranslated = Right(ReadValue($BaseKey, '.Translated'), 8) If Not @ERROR $GetComputerMemory = (Val('&'+Right($RAMTranslated,2)+SubStr($RAMTranslated,5,2))+250+16)/16 If ($GetComputerMemory Mod 2)=1 $GetComputerMemory = $GetComputerMemory+1 EndIf Else $GetComputerMemory=@ERROR Exit $GetComputerMemory EndIf EndFunction |
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 533 anonymous users online.
|
|
|