|
采用OMNIFS VHD镜像放在最后一个分区
@echo off
cls
tway /np >nul
::---------------------------------------------------
:sys_set
set VHD_DIR=VHD
set VHD_XP=VHD_XP-S1.VHD
set XP_BAK=VHD_XP-BAK.VHD
set VHD_W7=VHD_W7-S1.VHD
set W7_BAK=VHD_W7-BAK.VHD
set USE_PWD=1234
echo.
wbat text 3,6 (+green on black)"正在确定 VHDOS 镜像所在硬盘分区,请等待...... !!!"
echo.
omnifs info >hd_id.txt
awk -f lastdrv.awk hd_id.txt|nset VHD_PART=$1
::---------------------------------------------------
:use_pass
cls
call w.bat box :use_password # +1
if %password%==%USE_PWD% goto menu_vhd
wbat box "操作员密码错误!",重新输入,退出重启 #1
if errorlevel 100 goto use_pass
if errorlevel 2 goto end
if errorlevel 1 goto use_pass
::---------------------------------------------------
:menu_vhd
call w.bat box :vhdmenu # +3
if errorlevel 3 goto end
if errorlevel 2 goto w7_vhd
if errorlevel 1 goto xp_vhd
::---------------------------------------------------
:xp_vhd
cls
echo.
wbat text 3,6 (+green on black)"正删除%VHD_XP%并从%XP_BAK%恢复,稍后启动......!!!"
echo.
omnifs delete %VHD_PART%\%VHD_DIR%\%VHD_XP% >nul
omnifs copy %VHD_PART%\%VHD_DIR%\%XP_BAK% %VHD_PART%\%VHD_DIR%\%VHD_XP%
grub.exe --config-file="command (fd0)/boot/ntboot/ntboot vboot=/%VHD_DIR%/%VHD_XP%"
goto end
::---------------------------------------------------
:w7_vhd
cls
echo.
wbat text 3,6 (+green on black)"正删除%VHD_W7%并从%W7_BAK%恢复,稍后启动......!!!"
echo.
omnifs delete %VHD_PART%\%VHD_DIR%\%VHD_W7% >nul
omnifs copy %VHD_PART%\%VHD_DIR%\%W7_BAK% %VHD_PART%\%VHD_DIR%\%VHD_W7%
grub.exe --config-file="command (fd0)/boot/ntboot/ntboot nt6=/%VHD_DIR%/%VHD_W7%"
:end
quit.com r
[ 本帖最后由 O.Y.M.2010 于 2011-7-6 10:56 编辑 ] |
|