|
批处理
- @echo off &setlocal
- set "securemode="
- set "biosmode="
- for /f %%i in ('powershell.exe -nop -ep Bypass -c "Confirm-SecureBootUEFI"') do set "securemode=%%i"
- if /i "%securemode%"=="False" (
- set "biosmode=UEFI(未启用安全引导)"
- ) else if /i "%securemode%"=="True" (
- set "biosmode=UEFI(启用了安全引导)"
- ) else (
- powershell.exe -nop -ep Bypass -c "Confirm-SecureBootUEFI" | >nul find /i "PermissionDenied"
- if errorlevel 1 (
- set "biosmode=LEGACY BIOS(启用了传统BIOS)启动。"
- ) else (
- echo 拒绝访问. 请用Administrator权限运行!
- pause
- exit /b
- )
- )
- echo 当下计算机是采用%biosmode%
- pause
复制代码
|
|