如何使用批处理文件检查操作系统是否启用了AHCI或IDE

时间:2016-09-15 11:15:06

标签: windows batch-file scripting bios

假设在BIOS中,SATA Configuration设置为AHCI或IDE Enabled,那么无论如何都要检查是否通过批处理文件从操作系统(Windows XP,7)启用了AHCI或IDE?

1 个答案:

答案 0 :(得分:1)

我不知道这个脚本是否可以帮助你,但无论如何你可以尝试告诉我们你执行后会得到的结果:

@echo off 
Title Generate a text report for Devices manager
Mode con cols=80 lines=3
cls & color 0A & echo.
Set "LogFile=DeviceManager.txt"
Set "AHCI_LOG=AHCI_Log.txt"
If Exist "%LogFile%" Del "%LogFile%"
If Exist "%AHCI_LOG%" Del "%AHCI_LOG%"
echo       Please wait a while we generate the report in "%LogFile%" .....
start /wait msinfo32 /report "%LogFile%"
Find /I "AHCI" "%LogFile%" >> "%AHCI_LOG%"
start "" notepad "%AHCI_LOG%"