Solved

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

Posted on 2010-08-30
5
593 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
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

808 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