|
ascc
新手上路
积分 0
发帖 2
注册 2006-4-8
状态 离线
|
『楼 主』:
[已结]如何在批处理文件中先后执行两个文件
批处理问题!!!急急急急急,求高手看看帮帮忙小弟我先谢谢了!!!!:
我要在批处理文件AUTOEXEC.BAT中先后执行C:\EMUL目录内的disk.exe和sgag.exe两个文件,我不知道怎么写。
这是我的AUTOEXEC.BAT文件中的语句:
@ECHO OFF
KPUSH 27 27
KPUSH>NUL
REM Made by Wengier. China DOS Union.
REM All rights reserved. 2002-2003.
TM /F
LH KILLER
LH DOSKEY
LH CTMOUSE
::Note: The following line is for the compatibility on some systems:
LH CTMOUSE>NUL
IF %CONFIG%#==M6# GOTO SHUT
IF NOT %CONFIG%#==M5# GOTO BOOT
ECHO.
ECHO Now preparing to open README with Chinese support...
XMSDSK 80 /Y>NUL
FINDRAMD>NUL
IF %RAMDRIVE%#==# ECHO Can't create RAM disk!
IF %RAMDRIVE%#==# GOTO SHUT
EXTRACT /E /L %RAMDRIVE%\ DOSET.CAB EDIT.COM>NUL
XZL
%RAMDRIVE%\EDIT README.TXT
CLS
XZL /Q
:SHUT
CLS
WBAT BOX "Please enter your choice:",Shutdown the computer,Restart the computer
IF NOT ERRORLEVEL 3 GOTO ANS
WBAT BOX (RED ON YELLOW) "Note: Please make a choice!",OK
GOTO SHUT
:ANS
IF ERRORLEVEL 2 GOTO RES
ECHO Now trying to shutdown the computer..
ECHO.
SHUTDOWN S
ECHO.
ECHO Shutdown failed. Your computer may not have an ATX power.
:RES
ECHO Now restart the computer..
ECHO.
SHUTDOWN R
GOTO END
:BOOT
SET SM=
DREADY C:
IF ERRORLEVEL 1 ECHO Warning: Can't find any valid hard drives!
IF ERRORLEVEL 1 GOTO NOHD
ECHO Y|LOCK C:>NUL
ECHO.
ECHO Now trying to load the hard disk cache to speed the drives up...
WBAT BOX "Please choose the hard disk cache you like in 5 seconds:",PC-CACHE,SMARTDRV,Cancel #1,5
IF ERRORLEVEL 3 ECHO Cancelled.
IF NOT ERRORLEVEL 2 LH PCCACHE /SIZEXT:4096 /WRITE:OFF /WIN /MINI
IF ERRORLEVEL 2 IF NOT ERRORLEVEL 3 SET SM=Y
:NOHD
ECHO.
LH MSCDEX /D:IDE-CD /D:SCSI-CD /D:USB-CD /S /K
XMSDSK 4096 /Y
ECHO Setting up the RAM disk...
FINDRAMD>NUL
IF %RAMDRIVE%#==# GOTO NORAM
IF NOT EXIST %RAMDRIVE%\SYSTEM\NUL MD %RAMDRIVE%\SYSTEM
COPY COMMAND.COM %RAMDRIVE%\SYSTEM>NUL
EXTRACT /E /L %RAMDRIVE%\SYSTEM DOSET.CAB>NUL
EXTRACT /E /L %RAMDRIVE%\SYSTEM VC.CAB>NUL
ECHO The necessary tools have been successfully loaded to drive %RAMDRIVE%.
MD %RAMDRIVE%\TEMP
SET COMSPEC=%RAMDRIVE%\SYSTEM\COMMAND.COM
SET TMP=%RAMDRIVE%\TEMP
SET TEMP=%RAMDRIVE%\TEMP
PATH=%RAMDRIVE%.;%RAMDRIVE%\SYSTEM
IF %SM%#==Y# LH SMARTDRV 4096 2048 /X
GOTO NEXT
:NORAM
ECHO Warning: Can't create RAM disk!
IF %SM%#==Y# ECHO Can't load SMARTDRV!
SET COMSPEC=A:\COMMAND.COM
:NEXT
SET SM=
SET DIRCMD=/OGN /4
SET PROMPT=$P$G
PATH=%PATH%;C:.;A:.;..
LH SHARE
LH ZENO /Q
LH MOUSCLIP /M
LH DOSLFN /C- /Z:CP936UNI.TBL
IF %CONFIG%#==M3# IF %RAMDRIVE%#==# ECHO Warning: Can't load NTFS drives support!
IF %CONFIG%#==M4# IF %RAMDRIVE%#==# ECHO Warning: Can't load NTFS drives support!
IF %CONFIG%#==M3# IF NOT %RAMDRIVE%#==# NTFSDOS /U
IF %CONFIG%#==M4# IF NOT %RAMDRIVE%#==# NTFSDOS /U
LH ESCAPE
FINDCD /Q
CLS
WRITEXT 1 1 -f15 Note:
ECHO.
IF NOT %CDROM%#==# ECHO For accessing CD/DVD drive, use the drive letter %CDROM%(1st).
IF NOT %RAMDRIVE%#==# ECHO For accessing RAM drive, use the drive letter %RAMDRIVE%.
IF NOT %CONFIG%#==M3# IF NOT %CONFIG%#==M4# ECHO For accessing NTFS drives(if any), type NTFSDOS at the command line.
ECHO At any time, you can press F12 key to return to DOS, or use the mouse.
BREAK ON
LFNFOR ON
IF %RAMDRIVE%#==# GOTO END
ECHO.
ECHO Press ENTER in 2 seconds if you want to start Volkov Commander..
WAIT 2
SET VC=
IF ERRORLEVEL 13 IF NOT ERRORLEVEL 14 SET VC=1
IF %VC%#==# ECHO Skipped.
ECHO.
ECHO Now you're in MS-DOS 7.10 prompt. [Made by Wengier, China DOS Union]
ECHO.
ECHO For more information, please look at README.TXT (in Chinese).
ECHO To start Chinese system for Chinese, type XZL at the command line.
WRITEXT 0+ 1 "Any comments, please come to the forum at: " -f15 http://dosbbs.2ya.com/ -f7
ECHO.
IF %VC%#==# GOTO END
SET VC=
ECHO.
ECHO Starting Volkov Commander...
ECHO.
SET DIF=
STRINGS UMB=UMBLARGE >NUL
STRINGS DIF=SUB %UMB%,30720 >NUL
SET UMB=
IF NOT %DIF%#==# GOTO LH
VC
GOTO END
:LH
SET DIF=
LH VC
:END
ECHO.
[ Last edited by willsort on 2006-4-14 at 18:39 ]
|
|
2006-4-10 00:39 |
|
|
wl00560
银牌会员
积分 1384
发帖 709
注册 2005-10-29
状态 离线
|
『第
2 楼』:
本来想说这个问题太容易了,不过看你的autoexec.bat,好高深啊。不知是你写的,还是别人的?
如果只是想先后启动,你可以这样写:
C:\EMUL\disk.exe
c:\emul\sgag.exe
不过我不知你是什么意思。算帮你顶一下吧。
|
|
2006-4-10 00:48 |
|
|
xuantian
高级用户
积分 587
发帖 282
注册 2006-4-10
状态 离线
|
|
2006-4-10 04:48 |
|
|
willsort
元老会员
Batchinger
积分 4432
发帖 1512
注册 2002-10-18
状态 离线
|
『第
4 楼』:
───────────────── 版主提示 ─────────────────
为了方便论坛用户浏览和版主管理,请修改该主题的标题,以简要叙述主题的内容或意图
如果确认标题不需要修改,请继续回复该主题进行申辩,若申辩理由充分,将取消该通知
如果确认标题需要修改,请点击该主题首帖下方"编辑"按钮,在编辑页面中修改标题栏
如果此通知发出三日后仍未进行申诉或修改,将由版主进行修改,并对作者进行相应处罚
处罚为扣除8点积分,包括追回因发表主题奖励的6分和因标题违规而惩罚性扣除的2分
───────────────── 版主提示 ─────────────────
Re ascc:
将 wl00560 兄给出的代码写到autoexec.bat最后即可。另外,如果你的配置文件是标准安装后的MSDOS7.10的配置文件,那么简单声明一下即可,不需要将原文都转贴上来。
[ Last edited by willsort on 2006-4-14 at 18:35 ]
|
※ Batchinger 致 Bat Fans:请访问 [讨论]批处理编程的异类 ,欢迎交流与共享批处理编程心得! |
|
2006-4-10 13:15 |
|
|
ascc
新手上路
积分 0
发帖 2
注册 2006-4-8
状态 离线
|
『第
5 楼』:
谢谢!!!!!我笨不知道,谢谢各位兄弟了
|
|
2006-4-10 17:22 |
|
|
willsort
元老会员
Batchinger
积分 4432
发帖 1512
注册 2002-10-18
状态 离线
|
『第
6 楼』:
───────────────── 版务记录 ─────────────────
执行:Will Sort
操作:修改标题 - 20002 - 批处理问题!!!急急急急急,求高手看看
说明:原主题作者在通知发出三日后仍未申诉或修改,由版主修改并进行处罚
处罚:扣除因发表该主题而奖励的6点积分,扣除标题违规惩罚性2点积分
提示:请访问 {7326}论坛新手必读,所有人的基本行为准则[转帖]
───────────────── 版务记录 ─────────────────
|
※ Batchinger 致 Bat Fans:请访问 [讨论]批处理编程的异类 ,欢迎交流与共享批处理编程心得! |
|
2006-4-14 18:37 |
|