Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Processor type and speed
Message
From
01/10/2009 02:15:32
 
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
01427042
Message ID:
01427043
Views:
111
This message has been marked as the solution to the initial question of the thread.
>Can anyone show me how I can query a PC and get the Processor type and speed?
>
>TIA
local loCPUs, loCPU, lcKey, lcCPUKey, loTreeCollection, loWMI
 
loWMI  = GETOBJECT('WinMgmts:')
loCPUs  = loWMI.ExecQuery('Select * from Win32_Processor')
for each loCPU in loCPUs
 WITH loCPU
  ? 'Address Width             : ', .AddressWidth
  ? 'Architecture              : ', .Architecture
  ? 'Availability              : ', .Availability
  ? 'Caption                   : ', .Caption
  ? 'Config Manager Error Code : ', .ConfigManagerErrorCode
  ? 'CPU Status                : ', .CPUStatus
  ? 'Current Clock Speed       : ', .CurrentClockSpeed
  ? 'Current Voltage           : ', .CurrentVoltage
  ? 'Data Width                : ', .DataWidth
  ? 'Description               : ', .Description
  ? 'External Clock            : ', .ExtClock
  ? 'Family                    : ', .Family
  ? 'Family (Other)            : ', .OtherFamilyDescription
  ? 'L2 Cache Size             : ', .L2CacheSize
  ? 'L2 Cache Speed            : ', .L2CacheSpeed
  ? 'LoadPercentage            : ', .LoadPercentage
  ? 'Manufacturer              : ', .Manufacturer
  ? 'MaxClockSpeed             : ', .MaxClockSpeed
  ? 'Name                      : ', .Name
  ? 'PNP Device ID             : ', .PNPDeviceID
  ? 'Processor ID              : ', .ProcessorID
  ? 'ProcessorType             : ', .ProcessorType
  ? 'Revision                  : ', .Revision
  ? 'Role                      : ', .Role
  ? 'SocketDesignation         : ', .SocketDesignation
  ? 'Status                    : ', .Status
  ? 'Stepping                  : ', .Stepping
  ? 'UniqueId                  : ', .UniqueId
  ? 'Upgrade Method            : ', .UpgradeMethod
  ? 'Version                   : ', .Version
  ? 'Voltage Caps              : ', .VoltageCaps
 endwith
endfor
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform