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-11 10:50
中国DOS联盟论坛 » DOS学习入门 & 精彩文章 (教学室) » Please help me explain a few commands in a batch file View 2,136 Replies 7
Original Poster Posted 2007-10-19 19:47 ·  中国 山东 聊城 阳谷县 联通
新手上路
Credits 3
Posts 2
Joined 2007-10-14 17:13
18-year member
UID 99733
Gender Male
Status Offline
@ECHO OFF
LH MSCDEX.EXE /D:PATACD01 /D:SATACD01 /D:SATACD02 /D:SATACD03 /D:USB-CD
findcd /s>nul
call findcdr "ghost.exe" C D E F G H I J K L M N O P Q R S T U V W X Y Z
%CDROM%:
mouse.exe
ghost.exe -crcignore -fro -fx
ezboot.com
This is a batch script extracted from Donghai GHOST to directly boot GHOST. I really don't understand what the instructions after MSCDEX.EXE mean? Can you explain them one by one?
call findcdr "ghost.exe" C D E F G H I J K L M N O P Q R S T U V W X Y Z
(Isn't the CALL language used to start another batch script? How can it be followed by findcdr? What does the string of letters after "ghost.exe" mean?
ghost.exe -crcignore -fro -fx
(What do -crcignore -fro -fx mean?)
Please explain it for the expert, okay
(This is just to start GHOST, not to restore the system.)
Floor 2 Posted 2007-10-19 20:34 ·  中国 甘肃 平凉 电信
金牌会员
★★★★
Credits 4,103
Posts 1,744
Joined 2006-01-20 13:00
20-year member
UID 49241
Gender Male
From 甘肃.临泽
Status Offline
Not familiar with command lines under DOS
Floor 3 Posted 2007-10-20 09:36 ·  中国 北京 西城区 联通
银牌会员
★★★
Credits 1,287
Posts 634
Joined 2007-05-02 15:06
19-year member
UID 87277
Gender Male
From cmd.exe
Status Offline
Question 1: Search for the help of MSCDEX.EXE by yourself
Question 2: call can also start a program. The following letters seem to be parameters
Question 3: Check the command-line help of ghost
Floor 4 Posted 2007-10-20 19:06 ·  中国 江苏 南京 电信
初级用户
Credits 48
Posts 20
Joined 2007-10-17 01:05
18-year member
UID 99934
Gender Male
Status Offline
MSCDEX.EXE is the CD-ROM extension command of DOS. The syntax of MSCDEX.DEX is:
MSCDEX /D:
/D:driverl is a required parameter in the MSCDEX.EXE command. It specifies a drive name for the CD-ROM. The usual drive name is MACD000. This drive name must match the /D parameter of the device driver in CDNFIG.SYS. When installing a second CD-ROM drive for the system, repeat this parameter, and the drive name is changed to MSCD001. Each CD-ROM drive must have a unique drive name.
/E means that if there is extended memory (EMS) available in the system, use extended memory to store the sector buffer.
/K means that MS_DOS will support CD-ROM volume labels in Japanese Chinese, which is not supported by default.
/S allows sharing the CD-ROM drive in a network environment and Windows for Workgroup environment.
/V counts the memory situation of the system after loading MSCDEX.EXE and displays it.
/L:letter assigns a specified logical drive name to the first CD-ROM drive. If there are multiple CD-ROM drives, the subsequent letters are assigned to it.
/M specifies the number of sector buffers to use.
For example:
C:\DOS\MSCDEX D:\MSCD000 D:\MSCD001 /L:G /H
This command sets up two CD-ROM drives, with drive names MSCD000 and MSCD001 respectively, logical drive names G and H respectively, and sector buffers are allocated in extended memory. Type H: at the DOS prompt and press Enter to enter the first CD-ROM drive.
As for PADA and SATA, SATA is commonly known as serial hard disk, and PADA is commonly known as parallel hard disk.
"findcdr", please note that "cdr" here is an abbreviation of CD-ROM (many DOS commands are not internal commands, pay attention to the third-party command-line tools in this folder when understanding). As for the long string of letters that follow, it refers to drives from C to Z. LZ should bring "%CDROM%:" when extracting the code, which is convenient for understanding. The last issue of the ghost parameter: -CRCIGNORE: try to ignore errors in the image file, -FRO: force to continue copying even if there are bad clusters, -FX: exit the program after copying is completed. Connected together, it means that if ghost prompts an error during the disc burning process, you can use the command line in pure DOS to force disc burning, which has a certain chance to repair hard disk bad sectors! ghost is a very powerful tool, there are many command lines, LZ can search online for query.

[ Last edited by nayezi on 2007-10-20 at 07:11 PM ]
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
regvip2008 +1 2007-10-26 08:48
Floor 5 Posted 2007-10-26 08:50 ·  中国 湖南 长沙 电信
初级用户
★★
Credits 187
Posts 87
Joined 2007-10-23 16:04
18-year member
UID 100558
Gender Male
Status Offline
Brother nayezi is really amazing! Since my points are limited, otherwise I would add more points!
Floor 6 Posted 2009-01-01 01:33 ·  中国 浙江 温州 苍南县 电信
初级用户
Credits 99
Posts 35
Joined 2008-02-19 13:45
18-year member
UID 110964
Gender Male
Status Offline
What is the function of this?
Floor 7 Posted 2009-01-01 18:33 ·  中国 重庆 电信
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
LOADHIGH (LH)

Load the program into the upper memory area. Loading the program into the upper memory area can reserve more conventional memory space for other programs to use (for information on memory optimization, see the "Get More Available Memory" chapter in the "MS-DOS 6.22 User's Manual").

Syntax:

LOADHIGH filename

To specify the memory area where the program is loaded, use the following syntax:

LOADHIGH ...] ]
filename

LOADHIGH can be abbreviated as LH.

Switch options:

/L:region1...]

Specify the memory area where the program is loaded. If /L is not used, MS-DOS will load the program into the largest free upper memory block (UMB) and make other available UMBs available to this program. Using /L can specify the specific memory area where the program is loaded or the memory area that the program can use.

Specify the area number after the /L switch to load the program into the largest free memory block in the specified area. For example, to load the program into the largest free memory block in area 4, enter /L:4 (enter the MEM /F command line to list free memory areas).

When using the /L switch, the program can only use the specified memory area. For a program that needs to use multiple memory areas, multiple areas can be specified (use the MEM /M command and give the program name as a parameter to view the memory usage of the program). When specifying multiple areas, separate the memory block numbers with a semicolon (;). For example, to use memory blocks 2 and 3, enter /L:2 ; 3.

Usually, MS-DOS loads the program into the specified memory area containing the UMB that exceeds the program loading size (the program loading size is usually equal to the size of the executable file). If the space required by the program during operation is larger than the loading size, the minsize parameter can be used to ensure that the program is not loaded into a UMB smaller than the space required for operation. MS-DOS will load the program into a UMB larger than the program loading size and the size specified by minsize.

/S
Shrink the UMB to the minimum size when loading the program. Using this switch can use memory most efficiently. This switch is usually only used by the MemMaker program. MemMaker can analyze the memory usage of the program to determine whether it is safe to use this switch when loading the program. This switch can only be used with the /L switch and only affects UMBs that specify a minimum size.

Parameters:

filename
Specify the location and name of the program to be loaded.

parameters
Specify the command-line parameters required by the program.

Related commands:

For information on loading device drivers into the upper memory, see the <DEVICEHIGH> command.

For information on using MemMaker to move programs to the upper memory area, see the <MEMMAKER> command.

LOADHIGH (LH)─Notes

Requirement: DOS=UMB command

Before using the LOADHIGH command, you must add the DOS=UMB command in the CONFIG.SYS file. For more information on the DOS=UMB command, see the <DOS> command.

Automatically optimizing the upper memory area using MemMaker

The MemMaker program included in MS-DOS 6.22 can automatically optimize the use of system memory. MemMaker scans the upper memory, analyzes the memory usage of drivers and applications to determine the programs most suitable for loading into available UMBs. MemMaker adds the LOADHIGH command to the AUTOEXEC.BAT file and specifies /L and /S switches when needed. For more information on MemMaker, see the "Get More Available Memory" chapter in the "MS-DOS 6.22 User's Manual".

Must install an upper memory manager

Before being able to load programs into the upper memory area, an upper memory manager must be installed. MS-DOS provides EMM386.EXE for 80386 or higher computers to manage upper memory. You can install EMM386 using the DEVICE command in the CONFIG.SYS file (the DEVICE command for installing the HIMEM.SYS extended memory manager must come before the DEVICE command for installing EMM386)

How LOADHIGH works

When using LOADHIGH to load a program, MS-DOS will try to load the program into the upper memory area. If the upper memory area is not enough, MS-DOS will load the program into conventional memory. Use the MEM /M command and specify the program name to find out whether the program uses UMB.

Using LOADHIGH in AUTOEXEC.BAT

The most convenient way to use the LOADHIGH command is to use the LOADHIGH command in AUTOEXEC.BAT. (If the MemMaker program is used, the program will automatically add the required LOADHIGH command to the AUTOEXEC.BAT file.)

LOADHIGH (LH)─Examples

The following command line loads the DOSKEY program into the upper memory area and specifies that MS-DOS loads the program into memory area 1:

loadhigh /l:1 c:\dos\doskey

The following command line loads the MYPROG.EXE program into memory area 1 and allows the program to use upper memory areas 3 and 4:

lh /L:1;3;4 c:\programs\myprog.exe

The following command line loads the MYPROG program into conventional memory (area 0) and allows the program to access upper memory area 1:

loadhigh /l:0;1 c:\programs\myprog.exe
Floor 8 Posted 2009-02-10 13:04 ·  中国 天津 电信
社区乞丐
Credits -46
Posts 25
Joined 2009-02-09 13:16
17-year member
UID 138388
Gender Male
From 内蒙
Status Offline
Great! That's wonderful... I've learned a lot today.
Forum Jump: