Click here to Skip to main content
15,844,602 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys,

How can I get the Computer Type according to the API?
(Such as Desktop, Notebook and Laptop and so on?)

:-D
Posted
Updated 16-Dec-10 22:54pm
v3
Comments
JF2015 17-Dec-10 0:23am    
Edited to fix spelling errors.
Dalek Dave 17-Dec-10 3:54am    
Edited for Readability.

1 solution

A good indication if a particular computer is a desktop or notebook is if it has a battery or not.
You can use the GetSystemPowerStatus[^] function to check.
 
Share this answer
 
Comments
JF2015 17-Dec-10 3:25am    
Nice idea.
Dalek Dave 17-Dec-10 3:54am    
Good Answer.
voloda2 17-Dec-10 4:02am    
But doesn't it return same values if you have UPS connected to your desktop?
[no name] 17-Dec-10 4:09am    
Voloda2; you're right, it does. It's an indication, not a guarantee. There is no 100% reliable convenient bit set somewhere to identify a computer as a laptop.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900