Special MENU for 0PE
terminal console
debug off
checkrange 20110809:-1 read 0x8278 || clear && pause You should use grub4dos-0.4.5b-2011-08-09 or above. && reboot
write 0x60368 0
checkrange 0x80 read 0x8280 && write 0x60368 1
checkrange 0x23 read 0x8280 && checkrange 0x80 calc *0x82B9&0xff && write 0x60368 1
echo -e \n\nPress a key within 3 seconds:
echo -e \n\t<Enter>--Continue(by default)\n\t<Esc>--Grub4Dos Commandline\n\t<Space>--Load 0PE.ISO into memory entirely\n
set tkey= && pause --wait=3 && set /A tkey=*0x4CB00
if not exist tkey commandline
debug off
set mapmem=
if /i "%tkey%"=="0x20" set mapmem=1
set tkey=
#可在这里指定整体启动0PE.ISO的路径、名字。默认/0PE.ISO。指定的不存在,就找/0PE/0PE.ISO。
if not exist PEISO set PEISO=/0PE.ISO
set noacc=
read 0x60064 && set noacc=1 ! if not exist (bd)/BOOT/GRUB/USB_ACC.0PE if not exist (224)/BOOT/GRUB/USB_ACC.0PE set noacc=1
if not exist noacc if exist (bd)/BOOT/GRUB/USB_ACC.0PE (bd)/BOOT/GRUB/USB_ACC.0PE --time-out-disable:0
if not exist noacc if not exist (bd)/BOOT/GRUB/USB_ACC.0PE (224)/BOOT/GRUB/USB_ACC.0PE --time-out-disable:0
default 0
timeout 0
#0
title
echo
echo 0PE by Pseudo
read 0x60064 || if exist /0PE/0PE.GZ && goto 2 ! echo -n
read 0x60064 || if exist %PEISO% && goto 1 ! echo -n
read 0x60064 || if exist /0PE/0PE.ISO set PEISO=/0PE/0PE.ISO && goto 1 ! echo -n
title [1] 直接启动0PE之XP中文版 \n Windows PE (XP)
#这行表示选定0PE第1菜单项([1] Windows PE (XP) 中文版)
run --noboot /0pe.iso(假设0pe.iso放根目录)
command RUN (0xff)/BOOT/GRUB/MENU.0PE 1
其他以此类推。