|
原帖由 22287564 于 2011-11-23 02:03 发表 
title 【11】 安装Vista/Windows7/2008系统
echo $[1106] Loading DND1.ISO Image, Please Wait ...
map --mem (ud)/PE/DND1.ISO (0xff)
map --hook
chainloader (0xff)
title 【12】 ===尝试从本地硬盘启 ...
你也不要打听,后缀为.lst .usr .diy和 menu.0pe 文件识别为菜单文件,主菜单也不是你说的lst .
checkrange 0x21 read 0x8280 && pxe detect NotExist
command --set-path=(bd)/BOOT/GRUB/
timeout 10
default 11
gfxmenu (ud)/BOOT/GRUB/MESSAGE
configfile (md)4+8
title 【01】 运行电脑店Win03PE增强版
checkrange 0x30001:-1 read 0x8298
clear
echo $[1106] Loading DND WIN03PE.ISO, Please Wait ...
map --mem (bd)/PE/WINPE.ISO (0xff) ! map (bd)/PE/WINPE.ISO (0xff)
map --e820cycles=0
map --hook
chainloader (0xff)
title 【02】 运行电脑店Win7PE精简版
checkrange 0x30001:-1 read 0x8298
clear
echo $[1106] Loading DND WIN7PE.ISO, Please Wait ...
map --mem (bd)/PE/DND7PE.ISO (0xff) ! map (bd)/PE/DND7PE.ISO (0xff)
map --e820cycles=0
map --hook
chainloader (0xff)
title 【03】 运行电脑店超微PE(适用老机)
checkrange 0x30001:-1 read 0x8298
clear
echo $[1106] Loading DND WIN03PE.ISO, Please Wait ...
map --mem (bd)/PE/MINIPE.ISO (0xff) ! map (bd)/PE/MINIPE.ISO (0xff)
map --e820cycles=0
map --hook
chainloader (0xff)
title 【04】 运行DiskGenius3.5.0磁盘分区
RUN /BOOT/IMGS/DNDDOS.IMG
title 【05】 运行MaxDos VeDe 2011工具箱
RUN /BOOT/IMGS/MAXDOS.IMG
title 【06】 启动DOS时代菜鸟工具箱
RUN /BOOT/IMGS/DTSTOOL.IMA
title 【07】 安装GHO到硬盘第一分区
RUN /BOOT/IMGS/XGHOST.IMG
title 【08】 运行硬盘内存检测扫描工具
map --mem (ud)/BOOT/IMGS/HDDMEMST.ISO (0xff)
map --hook
chainloader (0xff)
title 【09】 运行Windows登陆密码破解
map --mem (ud)/BOOT/IMGS/PASSWORD.ISO (0xff)
map --hook
chainloader (0xff)
title 【10】 启动自定义ISO/IMG文件(DND目录)
RUN /DND/
title 【11】 安装Vista/Windows7/2008系统
echo $[1106] Loading DND1.ISO Image, Please Wait ...
map --mem (ud)/PE/DND1.ISO (0xff)
map --hook
chainloader (0xff)
title 【12】 ===尝试从本地硬盘启动===
echo $[1106] Loading NTBOOT.ISO Image, Please Wait ...
map --mem (ud)/BOOT/IMGS/NTBOOT.ISO (0xff)
map --hook
chainloader (0xff)
看见这个了RUN 吗?将RUN文件放在启动盘/BOOT/GRUB/目录下 (非此路径时需自己修改菜单,指定外部命令位置)
http://code.google.com/p/grub4/downloads/detail?name=RUN(%20chenall%E4%BF%AE%E6%94%B9%E7%89%88).zip&can=2&q=
这个RUN文件说白了就是压缩文件没有扩展名的大批处理.
!BAT BY [email=ZXW@WUYOU]ZXW@WUYOU[/email] plantsoot修改 20110201
if not exist debug set debug=0
debug %debug%
terminal console
checkrange 20110126:-1 read 0x8278 || echo -e \n $[0104]ERR$[0007]: $[0003]VERSION$[0007] IS $[0106]TOO OLD! && pause --wait=3 && exit 1
calc *0x82b8>>8&0xff-0x80 && map --floppies=1 ! map --floppies=0
calc *0x8280&0xff-0x21 || pxe keep
set runname=%~nx0 && delmod -l %~nx0 || insmod %0
if not exist usrmenu set usrmenu=(md)4+8
if not exist usrpath set usrpath=/BOOT/IMGS/
:begin
if /i "XP2K3"=="%~1" && goto XP2K3
if /i "VISTAWIN7"=="%~1" && goto VISTAWIN7
if "%~1"=="%~nx1" set /u path=%usrpath% || set /u path=%~p1
if "%~1"=="%~dpnx1" set /l bd=%~d1 && root %bd% && echo -n ! root (bd) && call :chdis
if #%~nx1==# goto :.input
if #%~x1==# goto :chain
goto :%~x1 || call :err %~x1
exit
:find
set /u name=%~nx1
if not exist %bd%%%~pnx1 && find --set-root %~pnx1 && call :chdis
if not exist %bd%%%~pnx1 exit
if /i not "%2"=="nocls" clear
echo -e \n Now $[0004]Loading $[0101]%bd%$[0003]%path%$[0002]%name%$[0007]...
exit
:serch
if "%bd%"=="(ud)" ls %path% && clear && exit
if "%bd%"=="(fd0,0)" ls %path:~,-1% && clear && exit
if /i not "%bd:~1,1%"=="h" if /i not "%bd:~1,1%"=="f" || if "%bd%:~4"==")" ls %path% && clear && exit
find --set-root --devices=hpnc ls %path:~,-1% && goto :chdis || echo -n
ls (ud)/%path% && root (ud) && set bd=(ud) && clear && exit
ls (0)/%path% && root (0) && set bd=(fd0) && clear && exit
ls (0,0)/%path:~,-1% && root (0,0) && set bd=(fd0,0) && clear && exit
find --set-root --devices=f ls %path% && goto :chdis || echo -n
set name= && set tmp=err
exit
:err
clear
if "%~1"=="%~x1" set tmp=The Lable - $[0002]%~1 || set tmp=%bd%$[0003]%path%$[0002]%name%
echo -e \n $[0104]ERR$[0007]: $[0101]%tmp%$[0007] IS $[0106]INVALID!
if #%~n1==# set path=%usrpath%
pause --wait=3 && goto :.input
exit
:chdis
debug 1
find | set bd=
debug %debug%
exit
:.img
:.ima
:.gz
if /i "%~n1"=="firadisk" if not #%x2==# goto :firaiso
call :find %~1
if not exist %~pnx1 goto :err
map --mem %~pnx1 (0)
map --hook
if /i "%~n1"=="maxdos" && if not #%~2==# goto :maxdos
rootnoverify (0)
chainloader (0)+1
boot
exit
:maxdos
if not exist (0)/CONFIG.SYS exit
if not exist (0)/AUTOEXEC.BAT exit
cat --locate=default=1,9 --replace=default=1,0 --number=1 (0)/CONFIG.SYS
debug 1
cat --locate="Call M.BAT" --number=1 (0)/AUTOEXEC.BAT | set offset=
debug %debug%
write --offset=0x%offset% (0)/AUTOEXEC.BAT %~2 %~3 %~4 %~5 %~6 %~7 %~8 %9
rootnoverify (0)
chainloader (0)+1
boot
exit
:.iso
call :find %~1
if not exist %~pnx1 goto :err
map %~2 %~pnx1 (0xff) || map --mem %~pnx1 (0xff)
map --hook
chainloader (0xff)
boot
exit
:.bin
:chain
:.0
call :find %~1
if not exist %~pnx1 goto :err
cat --locate=\xEB --length=4 --number=1 %~pnx1 || kernel %~pnx1 && boot && exit ! echo -n
if "%bd%"=="(fd0,0)" map (0)+1 (hd0) || map --in-place ()+1 (hd0) || map () (hd0)
map (hd0) (hd)
map --rehook
find --set-root --devices=h %~pnx1
root || echo
chainloader --force %~pnx1
boot
goto :eof
:firaiso
clear
if "%~2"=="%~nx2" set iso=%~p1%~nx2 || set iso=%~pnx2
call :find %~1
if not exist %~pnx1 goto :err
map --mem %~pnx1 (1)
call :find %iso% nocls
if not exist %~pnx1 goto :err
map --mem %iso% (0xff)
map --mem (md)+2880 (fd0)
calc *0x82b8>>8&0xff-0x80 || map (hd1) (hd0) && map (hd0) (hd1)
map --rehook
dd if=(1) of=(0) count=1
echo -e \n Press "$[0104]I$[0007]" in $[0004]10 $[0007]seconds to boot from ISO.
echo -e \x20Or press any other key to $[0004]continue System Installation.
checkrange 0x69,0x49 pause --wait=30 && chainloader (0xff) && rootnoverify (0xff) && boot && exit
find --set-root --devices=h /WIN_NT$.~BT/SETUPLDR.BIN && chainloader ()/WIN_NT$.~BT/SETUPLDR.BIN && boot && exit
find --set-root --devices=h /NTLDR && ls /NTDETECT.COM && chainloader /NTLDR && boot ! clear && echo -e \n $[0104]ERR$[0007]: $[0003]No Harddisk! && pause --wait=3 && goto :_input
exit
:.LST
:.0PE
:.USR
call :find %~1
if not exist %~pnx1 goto :err
if /i "%~nx1"=="menu.0pe" call :_0pe %2 %3
configfile %1
boot
exit
:_0pe
if #%1==# exit || calc %~1 && write 0x60300 0x60300 && write 0x60100 %~1
if /i not "%~x2"=="iso" exit
if "%~2"=="%~nx2" set /u tmp=%usrpath%%%~nx2 || set /u tmp=%~pnx2
write (md)0x301+1 %tmp%
set tmp=%tmp%
set /a tmp=*0x4CB00
write 0x60360 %tmp%
set tmp=
exit
:.input
:.list
pager off
call :serch
if /i "%tmp%"=="err" set tmp= && goto :err
set i=900 && set n=0 && echo -n > (md)0x3000+0x10 && clear
if not #%~2==# if "%~2"=="%~x2" set ext=%~x2 || set ext=
ls %bd%%%path% | call :.autolist %0 || echo -n
set l= && set n= && set r= && set s= && set t= && set tmp= && set ext=
:_input
clear
echo -e \n $[0101]AUTOLIST$[0007] FOR $[0006]%bd%$[0003]%path%$[0007]:\n
cat --skip=0 (md)0x3000+0x10 | echo -e -n \t\b
echo -e -n \n\n $[0007]Press "$[0104]M$[0007]" to $[0003]Main Menu $[0007]Or "$[0104]C$[0007]" To $[0003]Commandline.
set /u /p list=>Please Input The FILE/NUM/LETTER/PATH Here:
if not exist list set list=/PE.ISO
if not "%list%"=="0" if /i not "%list%"=="%path%" || goto :_input
if /i "%list%"=="C" && commandline
if /i "%list%"=="M" && configfile %usrmenu%
calc %list% && call :getfile %list% ! clear
if /i "%list:~,2%"=="F " && calc %list:~2% && call :getfile %list:~2% F
if "%list:~,1%"=="/" set path=
if not "%list:~,1%"=="(" set list=%bd%%%path%%%list%
set l= && set m= && set n= && set r=
pager on
if not "%~x1"==".list" call :begin %list%
exit
:.autolist
shift
if #%1==# exit
if exist ext if /i not %~x1==%ext% goto :.autolist
if not exist ext set tmp=%~n1 && if /i not #%~x1==#.TXT if not #%~x1==# if not "%tmp:~-2,1%"=="~" || goto :.autolist
set /a i=%i%+1
set /a n=%n%+1
set s=%~1%i%
set /A s=*0x4CB00
calc %s%/0x100 && echo $[0104]ERR:$[0106]File too long! && exit
set /a n=%s%/24+%n%
set /a t=%s% % 24/8
set r=\t\t\t
calc %t%-1 || set r=%r:~2%
calc %t%-2 || set r=%r:~4%
calc %n%-3 || set r=\n\t && set n=0
calc %n%/4 && set l=\n\t\b && set /a n=%s%/24+%n%-3 ! set l=
calc %s%/0x10 || set s=0%s:~-1% ! set s=%s:~-2%
echo -e -n %l%\\44[0006]%i:~1%\\44[0007].\\44[0000]%s%\\b\\44[0002]%~1%r%\b >> (md)0x3000+0x10
clear
echo Now Loading...$[0104]%i:~1%
goto :.autolist
exit
:getfile
checkrange 1:%i:~1% calc %1 || goto :_input
debug 1
set /a l=900+%1
set l=%l:~1%
set /a r=*0x4CB00
cat --locate=%l%\\44 --number=1 (md)0x3000+0x10 | set m=
set /a m=0x%r%+0x%m%+0x13
cat --skip=%m% --length=2 (md)0x3000+0x10 | set n=
set /a m=%m%+13 && set /a n=0x%n%-0x%r%-1
cat --skip=%m% --length=%n% (md)0x3000+0x10 | set list=
clear
debug %debug%
set list=%bd%%%path%%%list%
if #%2==# exit
if not exist %path%FIRADISK.IMG set path=%usrpath%
set list=%path%FIRADISK.IMG %list%
clear
exit
:.automenu
call :serch
if /i "%tmp%"=="err" set tmp= && goto :err
echo -e default 1 \ncolor white/blue blue/yellow light-red/blue 10\ntimeout 10\n > (md)0x3000+0x10
set i=901 && echo -e \ntitle AUTOMENU FOR %bd%%%path% \\n\nclear >> (md)0x3000+0x10
if not #%~2==# if "%~2"=="%~x2" set ext=%~x2 || set ext=
ls %path% | call :makemenu %0 || echo -n
echo -e \ntitle %i:~1%. RUN MainMenu\\n\tconfigfile %usrmenu%\nconfigfile %usrmenu% >> (md)0x3000+0x10
set i=
set tmp=
configfile (md)0x3000+0x10
exit
:makemenu
shift
if #%1==# exit
if exist ext if /i not %~x1==%ext% goto :.makemenu
set tmp=%~n1
if /i not #%~x1==#.TXT if not #%~x1==# if not "%tmp:~-2,1%"=="~" || goto :makemenu
if exist %~n1.TXT cat %~n1.TXT >> (md)0x3000+0x10 && echo -n \n\t%bd%%%path%%%~1 >> (md)0x3000+0x10 ! echo -e title %i:~1%. RUN %~1\\n\t%bd%%%path%%%~1 >> (md)0x3000+0x10
echo -e \n%runname% %bd%%%path%%%~1\nboot\n >> (md)0x3000+0x10
set /a i=%i%+1
goto :makemenu
exit
:XP2K3
find --set-root --ignore-floppies --ignore-cd /ntldr
map () (hd0)
map (hd0) ()
map --rehook
find --set-root --ignore-floppies --ignore-cd /ntldr
chainloader /ntldr
boot
exit
:VISTAWIN7
find --set-root --ignore-floppies --ignore-cd /bootmgr
map () (hd0)
map (hd0) ()
map --rehook
find --set-root --ignore-floppies --ignore-cd /bootmgr
chainloader /bootmgr
boot
exit
虽然你看不懂,还是把过程给你讲了,这个工具箱不是一般人就搞懂的,当今做pe的人很多,做出这个工具箱寥寥无几.
通过简易启动测试器测试,感觉不是p大 百大等这样等级水平才能做出来,经过测试研究果然如此.
[ 本帖最后由 风吹树梢 于 2011-12-6 03:05 编辑 ] |
|