判断是否UEFI系统,32位还是64位?

来源:互联网 发布:锵锵三人行 德国公知 编辑:程序博客网 时间:2024/06/05 07:37
@echo offREM Need to be run as AdministratorREM For Windows Vista and aboveREM try admin cmd to check access rightbcdedit 2>&1 >NULif /%ERRORLEVEL%/ == /1/ goto Need_PriviledgeREM For UEFI OS, there is boot loader winload.efiREM For Legacy OS, boot loader is winload.exebcdedit | find /i "winload.exe" > NULif /%ERRORLEVEL%/ == /0/ goto legacy_OS:UEFI_OSset a=UEFIgoto next:Legacy_OSset a=Legacygoto next:nextREM systeminfo | find /i "x64-based PC" >NULwmic OS get OSArchitecture | find /i "64-bit" >NULif /%ERRORLEVEL%/ == /0/ goto x86:x64set b=x64goto show:x86set b=x86goto show:showecho.echo This is %a% %b% OS!echo.set a=set b=pauseexit:Need_Priviledgeecho.echo Please run as Administrator!echo.pauseexit