Solved

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

Posted on 2010-08-30
5
595 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 300 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 50 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 150 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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

726 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