echo -off
#测试系统是32位还是64位
echo Platform : %Platform%
if %Platform% == x86 then
goto 32BIT
endif
if %Platform% == x64 then
goto 64BIT
else
echo Accident1,Can't use this U disk tool.
echo Please remake the USB Memory.
goto END
endif
:32BIT
for %i in 0 1 2 3 4 5 6 7 8 9
if exist fs%i:EFI\yhh then
echo EFI Volume: fs%i
fs%i:
cd efi\32bit
goto FOUND_32BIT
endif
endfor
echo Accident2,Can't use this U disk tool.
echo Please remake the USB Memory.
goto END
:FOUND_32BIT
yhhxlp32.nsh
goto END
:64BIT
for %i in 0 1 2 3 4 5 6 7 8 9
if exist fs%i:EFI\yhh then
echo EFI Volume: fs%i
fs%i:
cd efi\64bit
goto FOUND_64BIT
endif
endfor
echo Accident3,Can't use this U disk tool.
echo Please remake the USB Memory.
goto END
:FOUND_64BIT
yhhxlp64.nsh
goto END
:END
自动认x86或x64系统 后自动跳到该系统菜单
以x64系统为列yhhxlp64.nsh
echo -off
CD yhhxlp64
:MAIN_MENU
cls
echo ******************************************************************
echo ************************[www.4068.net]****************************
echo ******************************************************************
echo [1] win8pex64
echo [2] xorboot
echo [3] grubx64
echo [4] refind_x64
echo [5] konbootdxe
echo [6] r*e*s*e*t*
echo [7] Samsung
echo [8] memtestx
echo [9] reset
echo [0] Exit to UEFI Shell
echo ******************************************************************
#这个是输入efi
ValueInput.efi /msg "Select a menu ..." /var:InputValue /len:1
if %InputValue% == 1 then
goto win8pex64
endif
if %InputValue% == 2 then
goto xorboot
endif
if %InputValue% == 3 then
goto grubx64
endif
if %InputValue% == 4 then
goto refind_x64
endif
if %InputValue% == 5 then
goto konbootdxe
endif
if %InputValue% == 6 then
goto end
endif
if %InputValue% == 7 then
goto Samsung
endif
if %InputValue% == 8 then
goto memtestx
endif
if %InputValue% == 9 then
goto reset
endif
if %InputValue% == 0 then
goto FINISH
else
goto MAIN_MENU
endif
goto FINISH
#*******************************************pause***********************
#这个我还没测试成功
:pause
pause 5
goto xorboot
#******************************************win8pex64********************
#多个pe菜单 我还没测试 不过一个还是没问题的
:win8pex64
cls
CD \
CD EFI\microsoft\boot
bootmgfw.efi
goto MAIN_MENU
# **********************************refind_x64**************************
:refind_x64
cls
CD \
CD EFI\boot
refind_x64.efi
goto MAIN_MENU
#--------------------xorboot--------------------------------
:xorboot
cls
CD \
CD EFI\boot
xorboot.efi
goto MAIN_MENU
#----------------------grubx64------------------------------
:grubx64
cls
CD \
CD EFI\boot
grubx64.efi
#------------------------konbootdxe-------------------------
#这个测试不成功 就是绕过密码的启动系统的东西
:konbootdxe
cls
cd \
cd efi\boot
KonBootDxeX64.efi
#-----------------------Samsung ---------------------
:Samsung
cls
cd \
cd efi\boot
Samsung.nsh
goto MAIN_MENU
#-----------------------------memtestx--------------------------------------
#内存测试efi
:memtestx
cls
cd \
cd efi\boot
MEMTESTX64.efi
#----------------------------reset-------------------------------------------
#重启
:reset
cls
reset
#----------------------- Finish ---------------------
:FINISH
CD ..
cls
#--------------------------double_finish--------------------------------------
:DOUBLE_FINISH
CD ..
cd ..
cd ..
echo exit menu.
#--------------------------end------------------------------------
:end