如何判断脚本在什么电脑下运行
如何判断脚本在台式电脑上运行还是在笔记本电脑上运行?[ 本帖最后由 水之心 于 2009-2-2 14:54 编辑 ] $objWMIService = ObjGet("winmgmts:\\.\root\CIMV2:Win32_SystemEnclosure")
$colItems = $objWMIService.instances_
For $colItem In $colItems
$Types = $colItem.ChassisTypes(0)
Next
MsgBox(0,"",$Types)
;3=台式机 10=笔记本
也可以参考下
http://www.autoitx.com/forum.php?mod=viewthread&tid=27&extra=page%3D3
附:
Value Meaning
1
Other
2
Unknown
3
Desktop
4
Low Profile Desktop
5
Pizza Box
6
Mini Tower
7
Tower
8
Portable
9
Laptop
10
Notebook
11
Hand Held
12
Docking Station
13
All in One
14
Sub Notebook
15
Space-Saving
16
Lunch Box
17
Main System Chassis
18
Expansion Chassis
19
SubChassis
20
Bus Expansion Chassis
21
Peripheral Chassis
22
Storage Chassis
23
Rack Mount Chassis
24
Sealed-Case PC 非常感谢!....:face (29): :face (38): 学习一下。 学习学习{:face (280):}
页:
[1]