获取系统位数

来源:互联网 发布:ubuntu网络 编辑:程序博客网 时间:2024/05/22 03:02
Dim str
Set object = GetObject("winmgmts:")
Set cs = object.ExecQuery("select * from Win32_ComputerSystem")
for each obj in cs
if InStr(obj.SystemType,"x64")<>0 Then
str =  "System : X64"
ElseIf InStr(obj.SystemType, "x86")<>0 then
str =  "System:X86"
End IF
Next

MsgBox str


详细的说明,请参考MSDN中的Win32_ComputerSystem。

原创粉丝点击