WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

WMI
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

WMI - Processor Info

Keywords:   WMI - Processor Info

Locator = ObjectOpen("WbemScripting.SWbemLocator")
Service = Locator.ConnectServer()
Security = Service.Security_
Security.ImpersonationLevel = 3
Class = "Win32_Processor"
Instance = Service.InstancesOf(Class)
hEnum = ObjectCollectionOpen(Instance)
While 1
  Obj = ObjectCollectionNext(hEnum)
  If Obj == 0 Then Break
  text=StrCat("DeviceID"," = ",Obj.DeviceID)
  text=StrCat(text,@crlf,"Architecture"," = ",Obj.Architecture)
  text=StrCat(text,@crlf,"MaxClockSpeed"," = ",Obj.MaxClockSpeed)
  text=StrCat(text,@crlf,"Description"," = ",Obj.Description)
  text=StrCat(text,@crlf,"ProcessorId"," = ",Obj.ProcessorId)
  text=StrCat(text,@crlf,"Manufacturer"," = ",Obj.Manufacturer)
  text=StrCat(text,@crlf,"Name"," = ",Obj.Name)
  text=StrCat(text,@crlf,"ProcessorType"," = ",Obj.ProcessorType)
  text=StrCat(text,@crlf,"Version"," = ",Obj.Version)
  ;text=StrCat(text,@crlf,DeviceID"," = ",Obj.DeviceID)
  Message(Class, text)
EndWhile
ObjectCollectionClose(hEnum)
ObjectClose(Instance)
ObjectClose(Security)
ObjectClose(Service)
ObjectClose(Locator)

Exit


Article ID:   W15791
File Created: 2003:05:13:11:30:06
Last Updated: 2003:05:13:11:30:06