China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-13 02:36
中国DOS联盟论坛 » DOS学习入门 & 精彩文章 (教学室) » Batch experts, please take a look View 647 Replies 2
Original Poster Posted 2003-08-15 00:00 ·  中国 浙江 杭州 电信
中级用户
★★
Credits 411
Posts 78
Joined 2003-07-27 00:00
23-year member
UID 7622
Gender Male
Status Offline
//echo :m_dir " Select the GHO file to restore " >%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//
Can someone explain these two sections
:sc_2
。。。。。。。
::
:sc2
How is this section used

The batch program is as follows:
@echo off
REM Run the Tianhui Chinese character support system
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
※※※※※※※※※※※※※※※※※※※※※※※※※※
※ ※
※ ※
※ ※
※ ※
※ ※
※ ※
※ ※
※※※※※※※※※※※※※※※※※※※※※※※※※※
::
:sc1

goto _end

rem Choose whether to restore from this disc or switch to another disc
:_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
※※※※※※※※※※※※※※※※※※※※※※※※※※
※ ※
※ ※
※ ※
※ ※
※ ※
※※※※※※※※※※※※※※※※※※※※※※※※※※
::
:sc2

goto _end

REM Automatically eject the CD-ROM when switching discs, and pause

:_huan
REM Eject CD eject.com
EJECT.COM > nul
recur
call w.bat box @GCDROM.BAT:sc_3
goto sc3
:sc_3

~Aborted...~

The CD has been ejected. Please change the disc, then press . The tray will automatically close and continue...


::
:sc3
REM Load tray load.exe
load.exe > nul
echo Please wait, countdown in progress, the program will continue when it reaches zero!
REM 20-second countdown, call wait.exe
wait 20
goto _no

REM Detect the location and filename of the CD image file!

:_no
echo :m_dir " Select the GHO file to restore " >%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 !!! ※
※ ※
※ If you continue, the backup file on the CD will be copied to the first hard disk ※
※ first partition. ※
※ Press to continue, press to reboot. ※
※ ※
※ ※
※※※※※※※※※※※※※※※※※※※※※※※※※※
::
: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

Warning !!!

This will erase all data currently on your
harddisk !!!
Please make sure the documents you created on the hard disk have been backed up; if you continue

all documents on drive C will be deleted and cannot be restored !!!

※※※※※※※※※※※※※※※※※※※※※※※※※※
※ ※
※ Version 4.5 June 10, 2002 huwuyuan@163.com ※
※ ※
※※※※※※※※※※※※※※※※※※※※※※※※※※
Type uppercase "OK" to confirm this action
Please type uppercase "OK" and press Enter to confirm; press any other key and then Enter to reboot


::
: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.

System restore has completed successfully. Please remove the CD, then press to restart the system.

*****************************************************************

::
: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...~

An error occurred during hard disk restore, please contact technical personnel,

Please remove the CD, then press to restart the system.

*****************************************************************

::
:scx2

goto _end

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

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

~Aborted...~

There is no backup image file on your CD!!

Please remove the CD, then press to restart the system.

*****************************************************************

::
:scx3

goto _end

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

:_sd
%ramd%:
ghost
goto _off

:_cmd
cls
%ramd%:
goto _off

:_off


Floor 2 Posted 2003-08-16 00:00 ·  中国 福建 福州 电信
元老会员
★★★
农民
Credits 2,903
Posts 991
Joined 2003-07-23 00:00
23-year member
UID 7391
Gender Male
From 福建省
Status Offline
I suggest using EasyBoot to make a Chinese boot interface instead...
Personally I think when using Ghost.exe, it's best not to load things like Tianhui...
艰难奋长戟,万古用一夫

中国DOS联盟 http://www.cn-dos.net 欢迎大家来共同学习
我的MSN&E-Mail cn_archer@hotmail.com QQ 56049418
Floor 3 Posted 2003-08-16 00:00 ·  中国 浙江 杭州 余杭区 电信
中级用户
★★
Credits 411
Posts 78
Joined 2003-07-27 00:00
23-year member
UID 7622
Gender Male
Status Offline
Why is no one helping me?
Forum Jump: