:: ************************************************************************************************************************************************************************
:: 20240104
:: 该脚本可以用于测试BIOS report case时自动获取文件Chipsec log.
:: 注意:1.运行该脚本前要提前安装好Python.
:: 2.运行该脚本前要把该脚本与"csg_utils-XX.XX.XX" and "dell_chipsec_parser_XXX"两个文件夹放到"Chipsec tool"文件夹中,同时要根据实际把脚本中实际用到的文件名更改至该脚本;
:: 3.对应D13CSB平台,目前用csg_utils-1.10.1/dell_chipsec_parser_14这两版本文件,可以不修改该脚本内容并直接运行.其它平台要用该脚本则要根据前面的“注意2”进行脚本内容更改.
:: 作者: Darren Zhang
:: ************************************************************************************************************************************************************************
@echo off
echo *************************************************************
echo ****** Get "csg_utils" and "dell_chipsec_parser" files ******
echo *************************************************************
copy %cd%\csg_utils-1.10.1 %cd%\
copy %cd%\dell_chipsec_parser_14\* %cd%\
echo.
echo *****************************************************************************
echo ****** Run "pip install csg_utils-1.10.1-py3-none-any.whl" instruction ******
echo *****************************************************************************
pip install csg_utils-1.10.1-py3-none-any.whl"
echo.
echo ***************************************************
echo ****** Run "pip install chardet" instruction ******
echo ***************************************************
pip install chardet
echo.
echo ***************************************************
echo ****** Disable driver signature enforcement ******
echo ***************************************************
bcdedit.exe /set nointegritychecks on
echo.
echo *******************************************************
echo ****** Run "python chipsec_main.py > normal.txt" ******
echo *******************************************************
python chipsec_main.py > normal.txt
if EXIST normal.txt (goto NFHBG) else (goto GNFF)
echo.
:NFHBG
echo The normal.txt file has been generated!
echo.
goto GL
:GNFF
echo.
echo Failed to generate normal.txt file, please try again!
echo The window closes automatically after five seconds!!!
ping 127.0.0.1 -n 5 >nul
goto Exit
:GL
echo ********************************************************************************
echo ****** Run "python dell_chipsec_parser.py normal.txt --modes intelintgra" ******
echo ********************************************************************************
python dell_chipsec_parser.py normal.txt --modes intelintgra
echo.
echo **************************************************
echo ****** Enable driver signature enforcement ******
echo **************************************************
bcdedit.exe /set nointegritychecks off
echo.
pause
:Exit
exit