?
Solved

Check the PC's specs: e.g. RAM, Operating System, Hard Disk Space, etc

Posted on 2010-08-30
5
Medium Priority
?
596 Views
Last Modified: 2012-05-10
Hi folks

This is for an app that checks for minimum hardware requirements on Windows PC's (ranging from Windows 95 and up to Windows 7).

Any advice or WinAPI functions that can help with this?
0
Comment
Question by:rfwoolf
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 13

Accepted Solution

by:
aflarin earned 1200 total points
ID: 33557061
try TJvComputerInfoEx and TJvSysRequirements from JVCL: http://jvcl.delphi-jedi.org/

jvcl.PNG
0
 
LVL 13

Author Comment

by:rfwoolf
ID: 33557070
Thanks - I had a feeling the JVCL would have it - I was looking through their 'mega demo' and their component pallettes but couldn't see anything yet.
I'll give it a shot :)

PS> From my research so far it seems there was a bug in one of the delphi's in retrieving available ram - it would be about 500mb short.
0
 
LVL 14

Assisted Solution

by:Pierre Cornelius
Pierre Cornelius earned 200 total points
ID: 33564933
I wrote a little app that does exactly what you want a while ago. Unfortunately I don't have it with me but can post it later today (in about 9 hours time...).
0
 
LVL 4

Assisted Solution

by:flexiwebsw
flexiwebsw earned 600 total points
ID: 33565559
Try Glib, its got everything you need, including bios info

http://sourceforge.net/projects/glibwmi/
0
 
LVL 14

Expert Comment

by:Pierre Cornelius
ID: 33594422
Thx for the points, but I haven't done anything yet. Anyway, maybe this helps:

To get the system version I used (requires windows unit):

function LD_GetSystemVer: string;
var osvi: TOSVersionInfo;
    buf: array[1..80] of char;
begin
  osvi.dwOSVersionInfoSize:= SizeOf(TOSVersionInfo);
  GetVersionEx(osvi);

  case osvi.dwPlatformId of
    VER_PLATFORM_WIN32s:
         result:= Format('Microsoft Win32s %d.%d (Build %d) SP: %s',
                         [osvi.dwMajorVersion,
                          osvi.dwMinorVersion,
                          osvi.dwBuildNumber AND $FFFF,
                          string(osvi.szCSDVersion)
                          ]
                         );

    VER_PLATFORM_WIN32_WINDOWS:
        result:= Format('Microsoft Windows 95 %d.%d (Build %d) SP: %s',
                        [osvi.dwMajorVersion,
                         osvi.dwMinorVersion,
                         osvi.dwBuildNumber AND $FFFF,
                         string(osvi.szCSDVersion)
                         ]
                        );

    VER_PLATFORM_WIN32_NT:
        result:= Format('Microsoft Windows NT %d.%d (Build %d) SP: %s',
                        [osvi.dwMajorVersion,
                         osvi.dwMinorVersion,
                         osvi.dwBuildNumber AND $FFFF,
                         string(osvi.szCSDVersion)
                         ]
                        );
    else result:= '!Err'
  end;
end;





For memory I used (requires windows unit):

  function GetMemData: TMemoryStatus;
  begin
    result.dwLength:= SizeOf(TMemoryStatus);
    GlobalMemoryStatus(result);    
  end;



for disk space I used (requires SysUtils):

function GetDiskSpace(DriveLetter: Char): LargeInt;
begin
  DriveLetter := UpCase(DriveLetter);
  result:= DiskSize(Ord(DriveLetter) - 64);
end;

function GetAvailableSpace(DriveLetter: Char): LargeInt;
begin
  DriveLetter := UpCase(DriveLetter);
  result:= DiskFree(Ord(DriveLetter) - 64);
end;

to enumerate, you could do something like:

procedure GetDriveData(AList: TStringList);
var DrvLetter: Char;
begin
  for DrvLetter:= 'B' to 'Z' do
    if GetDriveType(pchar(DrvLetter+':\')) = DRIVE_FIXED then
    begin
      AList.Add('Drive '+DrvLetter+':');
      AList.Add('------------------------');
      AList.Add('size: '+ FormatFloat('#,##0', GetDiskSpace(DrvLetter)/1024/1024)+'Mb');
      AList.Add('free: '+ FormatFloat('#,##0', GetAvailableSpace(DrvLetter)/1024/1024)+'Mb');
      AList.Add('');
    end;
end;



Hope this helps.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question