可能重复:
How to check the machine type? laptop or desktop?
如何检查计算机是桌面还是移动的,在从HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\pcmcia,读取的WIN7注册表项中,“开始”值,膝上型计算机中的值不是=0,值= 3,也是桌面=3的值,这样就无法知道计算机的类型。
发布于 2011-09-08 11:45:30
如果可能,避免直接访问注册表。你可以尝试:
System.OperatingSystem osVersion = System.Environment.OSVersion;
// ...
PlatformID yourPlatform = osVersion.Platform;
// ...https://stackoverflow.com/questions/7347433
复制相似问题