|
#本菜单用grub4dos调用软盘映像方式快速还原:原生win2008r2/win7.vhd,及vboot驱动的win2008/winvista/win2003/winxp.vhd
default 0
timeout 0
title 0. Fast Restore System
echo Select Fast Restore's System:
echo 1-win2008r2
echo 2-win7
echo 3-win2008
echo 4-winvista
echo 5-win2003
echo 6-winxp
set /p sysno=Please Input 1-6(Input Others Return Main Menu):
checkrange 1:6 calc %sysno% || goto 1
if "%sysno%"=="1" set sysname=win2008r2
if "%sysno%"=="1" set diskno=1.3:
if "%sysno%"=="1" set vhddir=\vhd_sys
if "%sysno%"=="1" set subvhd=my_win2008r2_CHILD.vhd
if "%sysno%"=="1" set subvhdbak=my_win2008r2_CHILD_BAK.vhd
if "%sysno%"=="2" set sysname=win7
if "%sysno%"=="2" set diskno=1.2:
if "%sysno%"=="2" set vhddir=\win7
if "%sysno%"=="2" set subvhd=my_win7_CHILD.vhd
if "%sysno%"=="2" set subvhdbak=my_win7_CHILD_BAK.vhd
if "%sysno%"=="3" set sysname=win2008
if "%sysno%"=="3" set diskno=1.3:
if "%sysno%"=="3" set vhddir=\vboot_vhd
if "%sysno%"=="3" set subvhd=win2008_child.vhd
if "%sysno%"=="3" set subvhdbak=win2008_child_bak.vhd
if "%sysno%"=="4" set sysname=winvista
if "%sysno%"=="4" set diskno=1.3:
if "%sysno%"=="4" set vhddir=\vboot_vhd
if "%sysno%"=="4" set subvhd=winvista_child.vhd
if "%sysno%"=="4" set subvhdbak=winvista_child_bak.vhd
if "%sysno%"=="5" set sysname=win2003
if "%sysno%"=="5" set diskno=1.3:
if "%sysno%"=="5" set vhddir=\vboot_vhd
if "%sysno%"=="5" set subvhd=win2003_child.vhd
if "%sysno%"=="5" set subvhdbak=win2003_child_bak.vhd
if "%sysno%"=="6" set sysname=winxp
if "%sysno%"=="6" set diskno=1.3:
if "%sysno%"=="6" set vhddir=\vboot_vhd
if "%sysno%"=="6" set subvhd=winxp_child.vhd
if "%sysno%"=="6" set subvhdbak=winxp_child_bak.vhd
map --mem /grub4dos/restore_vhd.img (fd0)
map --hook
#使用以下命令通过环境变量传递参数
#echo @ECHO OFF > (fd0)/autoexec.bat
#echo set sysname=%sysname% >> (fd0)/autoexec.bat
#echo set diskno=%diskno% >> (fd0)/autoexec.bat
#echo set vhddir=%vhddir% >> (fd0)/autoexec.bat
#echo set subvhd=%subvhd% >> (fd0)/autoexec.bat
#echo set subvhdbak=%subvhdbak% >> (fd0)/autoexec.bat
#echo STOREVHD >> (fd0)/autoexec.bat
#或使用以下命令通过批处理文件直接传递参数
echo @ECHO OFF > (fd0)/autoexec.bat
echo STOREVHD %sysname% %diskno% %vhddir% %subvhd% %subvhdbak% >> (fd0)/autoexec.bat
rootnoverify (fd0)
chainloader +1
title 1. return Main menu
configfile (md)4+8 |
|