Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Processor type and speed
Message
De
01/10/2009 02:15:32
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
01427042
Message ID:
01427043
Vues:
113
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform