zoukankan      html  css  js  c++  java
  • Using WMIC For Gathering System Info

    WMIC is a command line interface to WMI (Windows Management Instrumentation). While it has many uses, I find it especially useful for querying certain system parameters.

    Processor:

    C:>wmic cpu get Name
    
    Name
    Intel(R) Pentium(R) M processor 1.80GHz
    C:>wmic cpu get NumberOfCores, NumberOfLogicalProcessors
    
    NumberOfCores  NumberOfLogicalProcessors
    1              1

    The NumberOfCores and NumberOfLogicalProcessors properties are new to Windows Vista. NumberOfLogicalProcessor refers to the number of hyperthreading execution units that a processor has. NumberOfCores, to state the obvious, gets you the number of cores that a processor has.

    Operating System:

    C:>wmic os get Name
    
    Name
    Microsoftr Windows VistaT Ultimate |C:Windows|DeviceHarddisk0Partition1
    
    C:>wmic os get BuildNumber, BuildType, Version
    
    BuildNumber  BuildType            Version
    6000         Multiprocessor Free  6.0.6000
    
    C:>wmic os get ServicePackMajorVersion, ServicePackMinorVersion
    
    ServicePackMajorVersion  ServicePackMinorVersion
    0                        0
    
    C:>wmic os get OperatingSystemSKU
    OperatingSystemSKU
    1
    

    The OperatingSystemSKU property is new to Windows Vista. A value of 1 means that you are running the Ultimate edition. Other values and their corresponding SKU names can be found on the Win32_OperatingSystem documentation page.

    Finally, Windows Vista introduces the concept of Windows Experience Index that allows you to measure your PC’s performance. Your computer’s Windows Experience Index (WEI) score can be queried from command line. First we find out if the WEI score for your computer is still valid:

    C:>wmic path Win32_WinSAT get WinSATAssessmentState
    
    WinSATAssessmentState
    1
    

    A value of 1 for the property WinSATAssessmentState means that we have the correct, latest value of the WEI score available. A value other than 1 means that the score is either unknown or needs to be recomputed to be coherent with a hardware change made to the machine. Here is how you can get to the WEI scores:

    C:>wmic path Win32_WinSAT get CPUScore, D3DScore, DIskScore, GraphicsScore, MemoryScore, WinSPRLevel
    
    CPUScore  D3DScore  DiskScore  GraphicsScore  MemoryScore WinSPRLevel
    3.7       2.5       3.8        2              4.1         2

    From:http://www.deepakg.com/blog/2007/08/using-wmic-for-gathering-system-info/
  • 相关阅读:
    如何更改Web Service部署生成的App_Code.dll的名称
    Orcas中C#语言的新特性:自动属性,对象初始化器,和集合初始化器
    驗證類javascript
    多线程下WinForm开发应该注意哪些问题?
    把表从Access2007导出到Sql Server
    面向对象模型的四种核心技术
    ASP常用代碼二
    熊猫烧香代码
    简繁体互转代码
    上班人员必读:“五险一金”详解!
  • 原文地址:https://www.cnblogs.com/diyunpeng/p/3668624.html
Copyright © 2011-2022 走看看