|
我在葛明阳的一键ghost中得到提取到如下批处理。。。
@echo off
rem 初始化
if exist u.dat set shd=2
if not exist u.dat set shd=1
rem 选择源盘
:cho_s
cls
call w.bat box (+white on +blue) @ghost_1r.bat:_cho_s #1,10
cls
if errorlevel 100 goto exit
if "%?%"=="2" goto cd0
if "%?%"=="1" goto 1rec0
:_cho_s " 请选择GHOST映像文件来源 " [x]
[ 硬盘(&H) ] [ 光盘(&C) ]
#? 秒后自动选择"硬盘"
::
goto exit
rem 来自光盘, 找到光盘GHO文件了吗?
:cd0
if exist %cdrom1%\c_pan.gho goto cd100
if exist %cdrom2%\c_pan.gho goto cd200
if exist %cdrom3%\c_pan.gho goto cd300
if exist %cdrom4%\c_pan.gho goto cd400
rem 没找到光盘GHO文件
:nogho
cls
call w.bat box (+white on red) @ghost_1r.bat:_nogho
if errorlevel 100 goto exit
if errorlevel 1 goto exit
:_nogho " 错误! " [X]
错误: 没找到光盘:\c_pan.gho文件,安装失败!
注:
请将自制的GHO(C盘备份)刻录到光盘里(NERO或UltroISO):
要求是: 必须刻录到光盘根目录下,且文件名必须是c_pan.gho.
[ 返回(&R) ]
::
goto exit
:cd100
set romcd=%cdrom1%
goto cd1
:cd200
set romcd=%cdrom2%
goto cd1
:cd300
set romcd=%cdrom3%
goto cd1
:cd400
set romcd=%cdrom4%
goto cd1
REM 来自光盘, 手动or自动?
:cd1
if "%auto%"=="0" goto cd1_1
if "%auto%"=="1" goto cd1_2
REM 来自光盘, 手动
:cd1_1
cls
call w.bat box (+white on red) @ghost_1r.bat:_cd1_1 #2
cls
if errorlevel 100 goto exit
if "%?%"=="2" goto exit
if "%?%"=="1" goto cd2
:_cd1_1 " 一键恢复C盘 (来自光盘) " [x]
警告: 一旦"恢复",立即执行,C盘数据将全部被覆盖!
提示: 按"K"键开始恢复, 按"Esc"键返回主菜单.
[ 恢复(&K) ] [ 取消(&C) ]
::
goto exit
REM 来自光盘, 自动
:cd1_2
set auto=0
cls
call w.bat box (+white on red) @ghost_1r.bat:_cd1_2 #1,20
cls
if errorlevel 100 goto exit
if "%?%"=="2" goto exit
if "%?%"=="1" goto cd2
:_cd1_2 " 一键恢复C盘 (来自光盘) " [x]
警告: 一旦"恢复",立即执行,C盘数据将全部被覆盖!
提示: #? 秒后开始恢复, 按"Esc"键返回主菜单.
[ 恢复(&K) ] [ 取消(&C) ]
::
goto exit
:cd2
quit
call mouse.bat
ghost -clone,mode=pload,src=%romcd%\c_pan.gho:1,dst=%shd%:1 -fro -sure -fx
if errorlevel 1 goto 1rec2e
goto 1rec20
REM 来自硬盘, 手动or自动?
:1rec0
if "%auto%"=="0" goto 1rec
if "%auto%"=="1" goto 1rec_1
我想请哪位高手指点下 该如何让键盘自动输入k键 并自动从光盘恢复镜像!小弟先谢了 |
|