本帖最后由 WHY 于 2019-2-22 23:12 编辑
需要第三方命令行工具 smartctl.exe- @echo off
- %1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("""%~f0""","::",,"runas",1)(close)&exit /b
- pushd "%~dp0"
- set "result=无"
- for /f %%i in ('wmic DiskDrive where "MediaType like 'Fixed%%'" get Index ^| findstr "[0-9]"') do (
- smartctl -i pd%%i | find /i "Solid State Device" && set "result=有"
- ) > nul
- echo;SSD:%result%
- pause
复制代码
|