0 Replies - 1154 Views - Last Post: 10 February 2008 - 01:16 PM

#1 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1658
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Use WMI to retrieve CPU ID in VBScript

Posted 10 February 2008 - 01:16 PM

Description: Add the function to your vbs file, then call itThis is a snippet that can be used to retrieve the CPU ID in VBScript
Function GetCpuID() 
  'create our variables
  Dim wmi, cpu
  'use GetObject to get the WMI instance
  Set wmi = GetObject("winmgmts:")
  'loop through all CPU's found
  For Each cpu in wmi.InstancesOf("Win32_Processor")
  'write out the processor ID
   wscript.echo "CPU: " & cpu.ProcessorID     
  Next 
End Function 


Is This A Good Question/Topic? 0
  • +

Page 1 of 1