Microsoft KB Archive/35017

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 19:21, 12 August 2020 by X010 (talk | contribs) (X010 moved page Microsoft KB Archive/Q35017 to Microsoft KB Archive/35017 without leaving a redirect: Text replacement - "Microsoft KB Archive/Q" to "Microsoft KB Archive/")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Alterations to MS-DOS Shell’s DOSSHELL.BAT File PSS ID Number: Q35017 Article last modified on 01-11-1993 PSS database name: O_MSDOS

4.00

MS-DOS

The information in this article applies to:
- Microsoft MS-DOS operating system versions 4.0

Summary:

The file DOSSHELL.BAT, created by the SELECT utility when MS-DOS Version 4.00 is being installed on a system, is needed to run the MS-DOS Shell program. The following is a new version of this batch file, which contains a few changes that some people may prefer to the original version:

@echo off c: cd set SHFILES=/meu:shell.meu/clr:shell.clr set SHOPTNS=/dos/menu/snd/prompt/maint/exit/date/tran/mul/swap shellb %0 if errorlevel 255 goto END :COMMON break=off shellc %SHOPTNS% %SHFILES% /color :END break=on

More Information:

This new version of the batch file has the same functionality as the normal DOSSHELL.BAT file created by SELECT, but a few areas have been modified to allow for easier use.

The line that invokes SHELLB.EXE is improved from the one in the normal DOSSHELL.BAT file in that it allows the batch file DOSSHELL.BAT to be renamed to something other than DOSSHELL.BAT (e.g. SH.BAT).

Most of the command-line switches used for SHELLC.EXE are now stored in the environment variables SHFILES and SHOPTNS. These names are arbitrary, and have no special significance outside this batch file. If desired, they can be renamed or grouped differently. (SHFILES refers to the command-line switches that make references to files used by the Shell, and SHOPTNS refers to the standard options used by the Shell.) The advantage for this method is that the options that most people won’t change are isolated from the ones that will be commonly changed. For example, the video-mode parameters are often changed, whereas the dynamic loading of menus such as /MENU and /DOS are usually not changed.

All the frequently changed SHELLC command-line switches (/COLOR in this case) are located on the command line for SHELLC.EXE, isolated from the other command-line arguments. These often-changed switches could be abstracted even further by creating a new environment variable to contain them. To make the running of this batch file even faster, these SET statements could be placed in the file AUTOEXEC.BAT, which would only set them once, making this batch file smaller and faster.

One final minor improvement in this version of DOSSHELL.BAT is that there are no lines longer than 80 characters, which are sometimes difficult to display or edit.

You can make other changes to this batch file as you see fit. However, the main logic of loading SHELLB.EXE, then loading SHELLC.EXE after the label named “COMMON” cannot be changed. The batch file should remain in the same directory as the other MS-DOS Shell supplementary files, normally in a directory.

Additional reference words: 4.00 noupd

Copyright Microsoft Corporation 1993.