Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


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