Link to home
Start Free TrialLog in
Avatar of ChrisMDrew
ChrisMDrew

asked on

C++ How to detect if a system is a PC, Laptop or Server

I'm writing a program which needs to know whether a system is a desktop PC, laptop or a server.  It does not have to be 100% but needs to be pretty accurate.  I can check for a server simply by looking at the OS so that's not a problem.  A laptop I thought I could detect using the GetSystemPowerStatus() call but looking on the Internet it seems this may be flaky.  Any suggestions how best to determine what type of computer the program is running on.  This needs to be standrad MFC code as I can't guarantee that .NET will be installed
ASKER CERTIFIED SOLUTION
Avatar of Gideon7
Gideon7
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ChrisMDrew
ChrisMDrew

ASKER

Used part of this and also my own code which although not 100% does detect most laptops I have tested