无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站投放广告、加入VIP会员,请联系 微信:wuyouceo
查看: 2472|回复: 4
打印 上一主题 下一主题

[求助]哪位高手能给这个批处理解释一下?

[复制链接]
跳转到指定楼层
1#
发表于 2004-7-22 22:24:42 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
@ECHO OFF
SET DIRCMD=/O
set ramd=z:
a:\xmsdsk 2048 %ramd% /y /t
echo.
echo Preparing base files to drive Z: ...  
echo.
mkdir %ramd%\bin
mkdir %ramd%\temp
set tmp=%ramd%\temp
set temp=%ramd%\temp
set path=%ramd%\bin
copy a:\command.com %ramd%\ >nul
set comspec=%ramd%\command.com
copy a:\extract.exe %ramd%\bin >nul
copy a:\device.com %ramd%\bin >nul
extract /y /l %ramd%\bin /e a:\ebd.cab >nul
lh mouse >nul
lh doskey >nul
cls
echo Extracting device driver(s)...
mkdir %ramd%\device
extract /y /l %ramd%\device /e a:\cdrom.cab >nul
device %ramd%\device\vide-cdd.SYS /D:MSCD000
cls
echo.
echo Preparing to start your computer.
echo This may take a few minutes. Please wait...
echo.
lh mscdex /D:MSCD000
lh smartdrv
call findcd.bat
echo.
echo The diagnostic tools were successfully loaded to drive Z:.
echo.
:END
%ramd%
call gcdrom.bat

以上是一个AUTOEXEC.BAT文件的内容,哪位大哥给逐行解释一下!热切期待中……
2#
发表于 2004-7-23 00:48:44 | 只看该作者

[求助]哪位高手能给这个批处理解释一下?

注释在每一行命令的上面,以::开头
:: 关闭命令回显,执行时不显示每条命令
@ECHO OFF
:: 设置DIR命令的环境变量参数,使其默认列表时排序
SET DIRCMD=/O
:: 设置环境变量(虚拟盘的盘符)ramd为z:
set ramd=z:
:: 运行A盘的虚拟磁盘程序生成2M的虚拟磁盘在Z:盘
a:\xmsdsk 2048 %ramd% /y /t
:: 显示换行
echo.
:: 显示Preparing base files to drive Z: ...
echo Preparing base files to drive Z: ...  
echo.
:: 建立z:\bin目录
mkdir %ramd%\bin
:: 建立z:\temp目录
mkdir %ramd%\temp
:: 设置环境变量tmp、temp为z:\temp
set tmp=%ramd%\temp
set temp=%ramd%\temp
:: 设置搜索路径path
set path=%ramd%\bin
:: 复制文件a:\command.com到z:\,>nul表示将命令执行结果输出到空设备,即不显示命令执行结果
copy a:\command.com %ramd%\ >nul
:: 设置环境变量comspec为z:\command.com,这个变量用来指定系统使用的command.com的位置
set comspec=%ramd%\command.com
:: 继续复制程序到虚拟磁盘
copy a:\extract.exe %ramd%\bin >nul
copy a:\device.com %ramd%\bin >nul
:: 解压缩a:\ebd.cab到z:\bin
extract /y /l %ramd%\bin /e a:\ebd.cab >nul
:: 调入鼠标驱动, lh表示调入高端内存
lh mouse >nul
:: 调入doskey
lh doskey >nul
:: 清除屏幕显示
cls
:: 显示提示信息
echo Extracting device driver(s)...
mkdir %ramd%\device
extract /y /l %ramd%\device /e a:\cdrom.cab >nul
:: 用device命令调入光驱驱动
device %ramd%\device\vide-cdd.SYS /D:MSCD000
cls
echo.
echo Preparing to start your computer.
echo This may take a few minutes. Please wait...
echo.
:: 运行光驱接口程序,例光驱可用
lh mscdex /D:MSCD000
:: 调入磁盘缓存程序smartdrv
lh smartdrv
:: 调用findcd.bat批处理文件,应该是用来查找光驱给分配到哪个盘符了
call findcd.bat
echo.
echo The diagnostic tools were successfully loaded to drive Z:.
echo.
:: END标签
:END
:: 将当前盘切换为Z:
%ramd%
:: 调用gcdrom.bat,不知道这个批处理是做什么用的。
call gcdrom.bat

回复

使用道具 举报

3#
 楼主| 发表于 2004-7-23 02:22:51 | 只看该作者

[求助]哪位高手能给这个批处理解释一下?

非常感谢 Climbing 兄!!!
gcdrom.bat的内容如下:
@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 _sf
if "%?%" == "3" goto _sg
if "%?%" == "4" goto _si
if "%?%" == "5" goto _cmd
goto sc1
:sc_1
※※※※※※※※※※※※※※※※※※※※※※※※※※※
※                                                  ※
※        全 自 动 系 统 恢 复\备 份 光 盘          ※
※                                                  ※
※               此光盘由汪前进制作                 ※
※                   2003.8.18                      ※
※                                                  ※
※                                                  ※
※            [1. 从光盘自动恢复系统 ]              ※
※                                                  ※
※            [2. 从硬盘自动恢复系统 ]              ※
※                 (d:\SYSBAK.gho)                  ※
※                                                  ※
※            [3. 在D盘备份第一分区  ]             ※
※                 (690M分盘备份)                   ※
※                                                  ※
※            [4. 在D盘备份第一分区  ]              ※
※                  (不  分  盘)                    ※
※                                                  ※
※            [5. 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盘所有文档,不能恢复 !!!
※※※※※※※※※※※※※※※※※※※※※※※※※※
※                                                ※
※    欢迎使用全自动系统恢复(预 装)备份光盘     ※
※                                                ※
※                                                ※
※※※※※※※※※※※※※※※※※※※※※※※※※※
  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^,请联系技术人员!!!!
            
         
          请拿出光盘后,按【确定】重新启动系统。
*****************************************************************
                                                [ 确定(&O) ]
::
:scx2
goto _end
:_ERROR
EJECT.COM > nul
recur
call w.bat box @GCDROM.BAT:scx_3
goto scx3
:scx_3
*****************************************************************
        ~Aborted...~
            你的光盘没有备份的镜像文件!!  ^O^
        请拿出光盘后,按【确定】重新启动系统。
*****************************************************************
                                                [ 确定(&O) ]
::
:scx3
goto _end
:_end
RESTART.COM
SET gfile=
SET name=
echo.
:_sf
%ramd%:
ghost -clone,mode=pload,src=d:\SYSBAK.gho:1,dst=1:1, -sure
goto _off
:_sg
%ramd%:
ghost -clone,mode=pdump,src=1:1,dst=d:\SYSBAK.gho -sure -Z4 -split=690 -auto
goto _off
:_si
%ramd%:
ghost -clone,mode=pdump,src=1:1,dst=d:\SYSBAK.gho -sure -Z4
goto _off
:_cmd
cls
%ramd%:
goto _off
:_off

请问这个批处理是怎样配合Wbat.com及Wbat.ini来控制对话框的颜色的?以下是Wbat.ini的内容:
回复

使用道具 举报

4#
 楼主| 发表于 2004-7-23 02:24:27 | 只看该作者

[求助]哪位高手能给这个批处理解释一下?

以下是Wbat.ini的内容:
;               WBAT INI file   (semicolon for comments)
[general]                       ;1/0 for on/off
BlinkMode=0                     ;off recommended (see below)
ELvar=1                         ;SET ?=box exit code (errorlevel)
rightESC=0                      ;ESC by right mouse click outside box
ESCinput=0                      ;on ESC: 1=do not discard input
ErrorPause=1                    ;Halt on errors (errorlevel 255)
KeybFlush=0                     ;flush keyboard buffer before box
display
DragAnim=1                      ;box drag animation (1 is default)
BoxFrame="         "            ;3*3 pattern, example: "谀砍 忱馁"
CheckSymbol="+"         ;or 251 ;(checkbox) decimal code or quoted char
RadioSymbol="*"         ;or 254 ;(radio buttons) decimal or quoted char
SourceFile=WBAT.TXT             ;default source file name for layouts
PalFile=                        ;color palette (command: wbat pal)
FontFile=                       ;font file (command: wbat font)
                                ;("+" means: in directory of WBAT.COM)
[color]
Screen=   white on black        ;default for CLS and FILL
TextHi=   green on +white         ;screen text hilite (~~)
TextTitle=white on magenta     ;screen text title (#)
Box=      black on +white       ;default for box/menu/list
BoxHi=    green on +white         ;box text hilite
Divider=  black                  ;dividers in box (char "?, code 196)
Shadow=   +black                ;box shadow (NONE: no shadow)
BoxTitle= +white on +magenta        ;box title
Bar=      +white on +blue        ;active control element
Button=   black on white         ;control elements
HotKey=   +red                   ;hotkey character (background
optional)
                                ;NONE turns off hotkey functionality
;notes
;colors:      black,red,green,blue,brown,cyan,magenta,white
;optional:    bright/light or "+" character
;             yellow = bright brown, grey/gray = (normal) white
;Blinkmode=1 shows blinking characters instead of bright background.
;By deault blinking is turned off. No blinking in GUI mode anyhow.
回复

使用道具 举报

5#
发表于 2004-7-23 03:37:07 | 只看该作者

[求助]哪位高手能给这个批处理解释一下?

自己好好看一下WBAT的说明吧,我没有用过WBAT,不太了解。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2025-10-24 00:54

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表