Advertisement
Guest User

OSArchitecture.vbs

a guest
Sep 11th, 2015
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. ' Special BGInfo Script
  2. ' OS Architecture v1.5
  3. ' Programmed by WindowsStar - Copyright (c) 2009
  4. ' ---------------------------------------------------
  5.  
  6. strComputer = "."
  7. On Error Resume Next
  8. Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
  9. Set colSettings = objWMIService.ExecQuery ("Select * from Win32_Processor")
  10. For Each objComputer in colSettings
  11. If objComputer.Architecture = 0 Then ArchitectureType = "32Bit"
  12. If objComputer.Architecture = 6 Then ArchitectureType = "Intel Itanium"
  13. If objComputer.Architecture = 9 Then ArchitectureType = "64Bit"
  14. Next
  15.  
  16. Echo ArchitectureType
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement