Solved

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

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

815 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now