Solved

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

Posted on 2010-08-30
5
590 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
Comment Utility
try TJvComputerInfoEx and TJvSysRequirements from JVCL: http://jvcl.delphi-jedi.org/

jvcl.PNG
0
 
LVL 13

Author Comment

by:rfwoolf
Comment Utility
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
Comment Utility
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
Comment Utility
Try Glib, its got everything you need, including bios info

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

Expert Comment

by:Pierre Cornelius
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

762 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