[原创]调用 api 实例(调用com库实现wmi应用)(检索WMI 类:MSFT_PhysicalDisk,即硬盘总线类型、健康状态、转速,类型HDD、SSD等)
2023-7-17 649

 

此处内容隐藏,回复后可见!立即回复  回复后请刷新页面!刷新

最后于 2023-7-19 被527104427编辑 ,原因:
收藏
点赞 1
道具卡
分享
https://www.123pan.com/s/NflRVv-Cm5Sh
最新回复 (14)
  • avatar image
    ffhello 2023-7-18

    好,先收藏,以后备用,感谢

    (~^^~)
  • avatar image
    mxlee 2023-7-18

    PE精简WMIC组件还能用吗

  • avatar image
    123 2023-7-19

    感谢分享

    123
  • avatar image
    pda8888 2023-7-21

    如果PE里面wmic不完整,也可以用?

    学习至上
  • avatar image
    smss 2023-7-23

    .
  • avatar image
    anson4 2023-8-4

    感谢分享!

    单机计算
  • avatar image
    jonyzhr 2023-9-1

    感谢分享

    WINST
  • avatar image
    xhzkp 2023-9-29

    感谢分享

  • avatar image
    pda8888 2023-11-16

    没有看到健康度。

    学习至上
  • avatar image
    pda8888 2023-11-16

    说错了。健康度是错误值。

    我的结果是这样的:

    UniqueIdFormat: 8

    DeviceId: 0

    FriendlyName: XPG GAMMIX S70 SE

    HealthStatus: 0

    OperationalStatus: 38720

    OperationalDetails: 

    PhysicalLocation: Integrated : Bus 1 : Device 0 : Function 0 : Adapter 2

    VirtualDiskFootprint: 3512 Bytes

    Usage: 1

    SupportedUsages: 38784

    Description: 

    PartNumber: 

    FirmwareVersion: SN14159

    SoftwareVersion: 

    Size: 1024209543168 Bytes

    AllocatedSize: 1024209543168 Bytes

    BusType: 17 (BusTypeNvme) (Nvme)

    IsWriteCacheEnabled: 0

    IsPowerProtected: 0

    PhysicalSectorSize: 4096 Bytes

    LogicalSectorSize: 512 Bytes

    SpindleSpeed: 0 RPM

    IsIndicationEnabled: 0

    EnclosureNumber: 0

    SlotNumber: 0

    CanPool: 0

    CannotPoolReason: 39360

    OtherCannotPoolReasonDescription: 

    IsPartial: 65535

    MediaType: 4 (SSD)

     

    UniqueIdFormat: 3

    DeviceId: 2

    FriendlyName: WDS100T1 X0E-00AFY0

    HealthStatus: 0

    OperationalStatus: 41664

    OperationalDetails: 

    PhysicalLocation: Integrated : Bus 0 : Device 0 : Function 20 : Adapter 4 : Port 0

    VirtualDiskFootprint: 2168 Bytes

    Usage: 1

    SupportedUsages: 38272

    Description: 

    PartNumber: 

    FirmwareVersion: 0

    SoftwareVersion: 

    Size: 1000204886016 Bytes

    AllocatedSize: 1000204886016 Bytes

    BusType: 7 (BusTypeUsb) (USB)

    IsWriteCacheEnabled: 0

    IsPowerProtected: 0

    PhysicalSectorSize: 512 Bytes

    LogicalSectorSize: 512 Bytes

    SpindleSpeed: 0 RPM

    IsIndicationEnabled: 0

    EnclosureNumber: 0

    SlotNumber: 0

    CanPool: 0

    CannotPoolReason: 41408

    OtherCannotPoolReasonDescription: 

    IsPartial: 65535

    MediaType: 4 (SSD)

     

    UniqueIdFormat: 8

    DeviceId: 1

    FriendlyName: HP SSD EX900 500GB

     lthStatus: 0

    OperationalStatus: 38016

    OperationalDetails: 

    PhysicalLocation: PCI Slot 28 : Bus 2 : Device 0 : Function 0 : Adapter 3

    VirtualDiskFootprint: 3096 Bytes

    Usage: 1

    SupportedUsages: 41472

    Description: 

    PartNumber: 

    FirmwareVersion: S0614B0

    SoftwareVersion: 

    Size: 500107862016 Bytes

    AllocatedSize: 500107862016 Bytes

    BusType: 17 (BusTypeNvme) (Nvme)

    IsWriteCacheEnabled: 0

    IsPowerProtected: 0

    PhysicalSectorSize: 4096 Bytes

    LogicalSectorSize: 512 Bytes

    SpindleSpeed: 0 RPM

    IsIndicationEnabled: 0

    EnclosureNumber: 0

    SlotNumber: 0

    CanPool: 0

    CannotPoolReason: 41600

    OtherCannotPoolReasonDescription: 

    IsPartial: 65535

    MediaType: 4 (SSD)

    健康度都是0

    实际上是一个100%,两个98%

    学习至上
  • avatar image
    爱心会员VIP会员
    527104427 2023-11-16
    楼主   12
    pda8888 说错了。健康度是错误值。 我的结果是这样的: UniqueIdFormat: 8 DeviceId: 0 FriendlyName: XPG GAMMIX S70 SE HealthStat ...

    这是官方的解释:0代表正常。

     

     

    QQ截图20231116185251.webp

    https://www.123pan.com/s/NflRVv-Cm5Sh
  • avatar image
    pda8888 2023-11-17

    谢谢老大指教。

    不过这不完美,如果调用smart就能得到精确的健康度,不过速度稍慢,跟“闪电”二字无关了。

    学习至上
  • avatar image
    anhdv 2024-1-6

    Thanks

    anhdv
  • avatar image
    bnn17 2024-3-22

    多谢

    171717171717171717
返回