Possible Duplicate:
How to check the machine type? laptop or desktop?
How do I know if the computer is desktop or laptop? by c# code
This is not possible. What is the difference exactly? Best guess is to think of components that only appear in laptops, battery, mobile CPUs etc.
Why do you want to know that btw? Some UI logic because of it?
Also remind Virtual Machines can run on either.
Check the battery status!
if (SystemInformation.PowerStatus.BatteryChargeStatus == BatteryChargeStatus.NoSystemBattery)
{
//Desktop
}
else
{
//Laptop
}
精彩评论