中国DOS联盟论坛

中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net  论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

游客:  注册 | 登录 | 命令行 | 会员 | 搜索 | 上传 | 帮助 »
作者:
标题: 请批处理高手来看一下  上一主题 | 下一主题
hotdog
中级用户




积分 411
发帖 78
注册 2003-7-27
状态 离线
『楼 主』:  请批处理高手来看一下 

//echo :m_dir " 选择需要恢复的GHO文件 " [x]>%temp%\tmp.txt
dir %cdrom%\*.gho /b /s >>%temp%\tmp.txt
call w.bat list @%temp%\tmp.txt:m_dir
if errorlevel 100 goto _cmd
if "%wbat%"=="" goto _ERROR
set gfile=%wbat%//
//recur
call w.bat box @GCDROM.BAT:sc_1
if errorlevel 100 goto _cmd
if "%?%" == "1" goto _next
if "%?%" == "2" goto _sd
if "%?%" == "3" goto _cmd//
这两段哪位可以解释一下
:sc_2
。。。。。。。
::
:sc2
这段是怎么用的

批处理程序如下:
@echo off
REM   运行天汇汉字系统
TW /np /n3 > nul
cls
recur
call w.bat box @GCDROM.BAT:sc_1
if errorlevel 100 goto _cmd
if "%?%" == "1" goto _next
if "%?%" == "2" goto _sd
if "%?%" == "3" goto _cmd

goto sc1
:sc_1
※※※※※※※※※※※※※※※※※※※※※※※※※※
※                                                ※
※        [1. 全 自 动 恢 复 系 统       ]        ※
※                                                ※
※        [2. 我会用GHOST,用鼠标手动操作]        ※
※                                                ※
※        [3. DOS 命 令 行               ]        ※
※                                                ※
※※※※※※※※※※※※※※※※※※※※※※※※※※
::
:sc1

goto _end

rem 选择本盘恢复还是换一张盘恢复
:_next
recur
call w.bat box @GCDROM.BAT:sc_2
if errorlevel 100 goto _next
if "%?%" == "1" goto _no
if "%?%" == "2" goto _huan

goto sc2
:sc_2
※※※※※※※※※※※※※※※※※※※※※※※※※※
※                                                ※
※      [1. 恢复本张光盘上的*.gho文件      ]      ※
※                                                ※
※      [2. 换盘,恢复其它光盘上的*.gho文件]      ※
※                                                ※
※※※※※※※※※※※※※※※※※※※※※※※※※※
::
:sc2

goto _end

REM 换盘自动弹出光驱,并在暂停状态

:_huan
REM 弹出光盘eject.com
EJECT.COM > nul
recur
call w.bat box @GCDROM.BAT:sc_3
goto sc3
:sc_3

~Aborted...~

光盘已经弹出,请更换光盘后,按【确定】光盘会自动进盒,并继续……

                                                [ 确定(&O) ]
::
:sc3
REM 进盒load.exe
load.exe > nul
echo 请稍候,正在倒数计数,归零后程序继续进行!
REM            倒数计时20秒,调用wait.exe
wait 20
goto _no

REM 检测光盘镜像文件所在的位置和文件名!

:_no
echo :m_dir " 选择需要恢复的GHO文件 " [x]>%temp%\tmp.txt
dir %cdrom%\*.gho /b /s >>%temp%\tmp.txt
call w.bat list @%temp%\tmp.txt:m_dir
if errorlevel 100 goto _cmd
if "%wbat%"=="" goto _ERROR
set gfile=%wbat%

goto _txt

:_txt
recur
call w.bat box @GCDROM.BAT:sc_4
if errorlevel 100 goto _txt
if "%?%" == "1" goto _y

goto sc4
:sc_4
※※※※※※※※※※※※※※※※※※※※※※※※※※
※                                                ※
※   Copy disk image from CD-Rom to harddisk !!!  ※
※                                                ※
※   如果继续光盘上的备份文件将会拷贝到第一硬盘   ※
※   第一分区。                                   ※
※   按【确定】继续,按【取消】重新启动。         ※
※                                                ※
※                          [确定(&O)] [取消(&C)]   ※
※※※※※※※※※※※※※※※※※※※※※※※※※※
::
:sc4

goto _end

:_y
set tOK=
recur
call w.bat box @GCDROM.BAT:sc_5
if errorlevel 100 goto _end
if "%tOK%"=="OK" goto _ok

goto sc5
:sc_5

                     警告 !!!

    This will erase all data currently on your
    harddisk !!!
    请确定硬盘上您建立的文档是否备份好,如果继续

    将会删除C盘所有文档,不能恢复 !!!

※※※※※※※※※※※※※※※※※※※※※※※※※※
※                                                ※
※  4.5 版  2002年6月10日     huwuyuan@163.com    ※
※                                                ※
※※※※※※※※※※※※※※※※※※※※※※※※※※
  Type uppercase "OK" to confirm this action
  请输入大写“OK”并回车确认,按其它键后回车重启
  [$ tOK,2]

::
:sc5

goto _end

:_ok
set tOK=
cls
TW /Q
echo Loading...
rem without -rb switch! -quiet
ghost.exe -batch -sure -afile=NUL -clone,mode=pload,src=%gfile%:1,dst=1:1
rem ,szeL
if errorlevel 1 goto _abort
TW /np /n3 > nul
EJECT.COM > nul
recur
call w.bat box @GCDROM.BAT:scx_1
goto scx1
:scx_1
*****************************************************************

     Remove CD-Rom, and reboot system.

     恢复系统已顺利完成,请拿出光盘后,按【确定】重新启动系统。

*****************************************************************
                                                [ 确定(&O) ]
::
:scx1

goto _end

:_abort
TW /np /n3 > nul
EJECT.COM > nul

recur
call w.bat box @GCDROM.BAT:scx_2

goto scx2
:scx_2
*****************************************************************

        ~Aborted...~

        硬盘恢复出现错误,请联系技术人员,

        请拿出光盘后,按【确定】重新启动系统。

*****************************************************************
                                                [ 确定(&O) ]
::
:scx2

goto _end

:_ERROR
EJECT.COM > nul
recur
call w.bat box @GCDROM.BAT:scx_3

goto scx3
:scx_3
*****************************************************************

        ~Aborted...~

        你的光盘没有备份的镜像文件!!

        请拿出光盘后,按【确定】重新启动系统。

*****************************************************************
                                                [ 确定(&O) ]
::
:scx3

goto _end

:_end
RESTART.COM
SET gfile=
SET name=
echo.

:_sd
%ramd%:
ghost
goto _off

:_cmd
cls
%ramd%:
goto _off

:_off


[此贴子已经被作者于2003-8-16 14:48:21编辑过]




2003-8-15 00:00
查看资料  发送邮件  发短消息 网志   编辑帖子  回复  引用回复
cn_archer
元老会员

农民


积分 2903
发帖 991
注册 2003-7-23
来自 福建省
状态 离线
『第 2 楼』:  

我建议还是用EasyBoot搞个中文的启动界面……
个人以为用Ghost.exe时尽量不要加载这些天汇之类的东东……



艰难奋长戟,万古用一夫

中国DOS联盟  http://www.cn-dos.net   欢迎大家来共同学习
我的MSN&E-Mail cn_archer@hotmail.com  QQ 56049418
2003-8-16 00:00
查看资料  发送邮件  发短消息 网志  OICQ (56049418)  编辑帖子  回复  引用回复
hotdog
中级用户




积分 411
发帖 78
注册 2003-7-27
状态 离线
『第 3 楼』:  

怎么没有人帮我啊

2003-8-16 00:00
查看资料  发送邮件  发短消息 网志   编辑帖子  回复  引用回复

请注意:您目前尚未注册或登录,请您注册登录以使用论坛的各项功能,例如发表和回复帖子等。


可打印版本 | 推荐给朋友 | 订阅主题 | 收藏主题



论坛跳转: