@echo off
REM Need to be run as Administrator
REM For Windows Vista and above
REM try admin cmd to check access right
bcdedit 2>&1 >NUL
if /%ERRORLEVEL%/ == /1/ goto Need_Priviledge
REM For UEFI OS, there is boot loader winload.efi
REM For Legacy OS, boot loader is winload.exe
bcdedit | find /i "winload.exe" > NUL
if /%ERRORLEVEL%/ == /0/ goto legacy_OS
:UEFI_OS
set a=UEFI
goto next
:Legacy_OS
set a=Legacy
goto next
:next
REM systeminfo | find /i "x64-based PC" >NUL
wmic OS get OSArchitecture | find /i "64-bit" >NUL
if /%ERRORLEVEL%/ == /0/ goto x86
:x64
set b=x64
goto show
:x86
set b=x86
goto show
:show
echo.
echo This is %a% %b% OS!
echo.
set a=
set b=
pause
exit
:Need_Priviledge
echo.
echo Please run as Administrator!
echo.
pause
exit判断是否UEFI系统,32位还是64位?
最新推荐文章于 2024-07-19 12:27:06 发布
本文深入探讨了操作系统在软件部署过程中的关键角色,包括系统配置、权限管理、资源分配及优化等核心方面。通过实例分析,阐述了如何在不同操作系统环境下高效部署应用,以及最佳实践策略。
2752

被折叠的 条评论
为什么被折叠?



