Advertisement
Guest User

Untitled

a guest
Jan 4th, 2013
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. On Error Resume Next
  2. Const BcdOSLoaderInteger_NumberOfProcessors = &h25000061
  3. Const Current = "{fa926493-6f1c-4193-a414-58f0b2456d1e}"
  4. Dim  objStoreClass, objStore, objDefault, objElement
  5. strComputer = "."
  6.  
  7. Set objStoreClass = GetObject("winmgmts:{(Backup,Restore)}\\" & _
  8.  strComputer & "\root\wmi:BcdStore")
  9.  
  10. objStoreClass.OpenStore "", objStore
  11. objStore.OpenObject Current, objDefault
  12.  
  13. if objDefault.GetElement (BcdOSLoaderInteger_NumberOfProcessors, objElement) Then
  14.  Wscript.Echo "Processors: " & objElement.Integer
  15. else
  16.  Wscript.Echo "Error to execute GetElement"
  17. End if
  18.  
  19. If Err.Number <> 0 Then
  20.     WScript.Echo "Error: " & Err.Number
  21.     WScript.Echo "Error (Hex): " & Hex(Err.Number)
  22.     WScript.Echo "Source: " &  Err.Source
  23.     WScript.Echo "Description: " &  Err.Description
  24.     Err.Clear
  25. End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement