cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Chetan
Level 3

Get the RAM Size

Hi Friends..

How do i get the total Size of the RAM. It should as same size when right clicked on MyComputer there RAM size will be showed.

How to achive this i am using Installshield 2008 Premier Edition

I read that Under Help that Hardware Properties have an option called "Physical Memory" should be used as property.

But how to use it as a property??

i am messed up with this.. plz help...

does any have sample code for this...

:confused: :confused: :confused:
Labels (1)
0 Kudos
(2) Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

What do you mean by get, or more importantly, how do you need to use this value, or what do you need to do in response to it?
0 Kudos
Reureu
Level 10

Hi,

the following code will read the amount of physical RAM in KB installed in the target PC.

function NUMBER getPhysicalRAM( )
STRING szTemp;
NUMBER nResult;
begin
if( GetSystemInfo( EXTENDEDMEMORY, nResult, szResult) < 0 ) then
nResult = 0;
endif;
return nResult;
end;


Have a look at the online help about GetSystemInfo, as this instruction does not return fully accurate results when used with EXTENDEDMEMORY. But it works fine for most purposes.

Regards
0 Kudos