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
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。