Saturday, September 13, 2025

Learn MS-DOS (Part 6) - Configuration & Environment Commands in MS-DOS

🖥 Introduction

By now, we’ve learned how to work with files, folders, disks, and system information. But MS-DOS is more than just commands — it’s an environment you can configure and personalize.

Configuration & environment commands are like the settings panel of DOS. They control how the system looks, how it starts up, and how programs interact with the operating system.


🔹 1. SET – Set Environment Variables

Purpose: Creates, changes, or displays environment variables.

Syntax:

SET [variable=[string]]

Examples:

SET

Displays all environment variables.

SET PATH=C:\DOS;C:\UTILS

Sets the PATH so DOS can find programs in C:\DOS and C:\UTILS.

SET USER=DADDY

Creates a variable USER with value DADDY.


🔹 2. PATH – Define Search Path for Programs

Purpose: Tells DOS where to look for executable files.

Syntax:

PATH [directory;...]

Examples:

PATH

Displays the current search path.

PATH C:\DOS;C:\APPS

Adds C:\DOS and C:\APPS to the search path.


🔹 3. PROMPT – Customize the Command Prompt

Purpose: Changes the text of the DOS prompt.

Syntax:

PROMPT [text]

Special Codes:

  • $P → Current drive & path

  • $G → Greater-than sign (>)

  • $D → Current date

  • $T → Current time

Examples:

PROMPT $P$G

Sets prompt to show current drive and path like C:\WORK>

PROMPT HelloDaddy$G

Sets prompt as HelloDaddy>


🔹 4. AUTOEXEC.BAT – Startup Batch File

Purpose: Runs automatically at boot and sets up environment.

  • Located at the root of the boot drive (C:).

  • Typically contains commands like PATH, SET, or programs to load at startup.

Example AUTOEXEC.BAT content:

@ECHO OFF PROMPT $P$G PATH C:\DOS;C:\UTILS SET TEMP=C:\TEMP

🔹 5. CONFIG.SYS – System Configuration File

Purpose: Loads device drivers and system settings during boot.

  • Located in the root of the boot drive.

  • Works alongside AUTOEXEC.BAT.

Common Commands in CONFIG.SYS:

  • DEVICE= → Load a driver

  • FILES= → Set max open files

  • BUFFERS= → Set disk buffers

Example CONFIG.SYS content:

DEVICE=C:\DOS\HIMEM.SYS FILES=30 BUFFERS=20

🔹 6. LOADFIX – Load Programs Above 64K

Purpose: Loads a program above the first 64K of memory, avoiding memory allocation issues.

Syntax:

LOADFIX [program] [arguments]

Example:

LOADFIX GAME.EXE

Runs GAME.EXE with memory fix applied.


🔹 7. LOADHIGH (LH) – Load Program into Upper Memory

Purpose: Loads a program into high memory to free up conventional memory.

Syntax:

LOADHIGH [program]

Example:

LH MOUSE.COM

Loads mouse driver into upper memory.


🔹 8. DEVICE / DEVICEHIGH – Load Drivers

Purpose: Loads device drivers from CONFIG.SYS, optionally into high memory.

Examples (in CONFIG.SYS):

DEVICE=C:\DOS\ANSI.SYS DEVICEHIGH=C:\DOS\RAMDRIVE.SYS

🧰 Bonus Tips

  • Always use PROMPT $P$G in AUTOEXEC.BAT — it’s the most practical setup.

  • PATH and SET are crucial for making programs run smoothly.

  • AUTOEXEC.BAT and CONFIG.SYS were the backbone of DOS customization.


✅ Conclusion

Configuration & environment commands turn MS-DOS from a plain system into your personal workspace. They let you define paths, set environment variables, and control how DOS boots and behaves.

👉 Next in Part 7, we’ll explore Networking Commands — how DOS connected computers in the early days of networking.

No comments:

Post a Comment

Learn Microsoft Word (Part 1) - Introduction to Microsoft Word

🖥 What is Microsoft Word? Microsoft Word is the world’s most popular word processing program . It’s used to create documents such as lette...