MS-DOS 5.00 - 7.10 Undocumented, Secret + Hidden Features |
Contents:
COMMAND.COM HIDDEN PARAMETERS
COMMAND /D used on the CONFIG.SYS
SHELL= line (the primary shell), or at the MS-DOS prompt (secondary shell
in combination with the COMMAND /P parameter), prevents the execution of
the AUTOEXEC.BAT file at bootup! Example:
SHELL=C:\COMMAND.COM
C:\ /E:512 /D /P
COMMAND.COM /F removes the
"Abort, Retry, Fail" message and forces a "Fail" response to all "Abort,
Retry, Fail" prompts issued by the DOS critical error handler. If the floppy
disk is not ready it automatically goes to Fail.
This switch can be used on the
CONFIG.SYS file SHELL= line. Example:
SHELL=C:\COMMAND.COM
C:\ /E:512 /F /P
COMMAND /F can also be used on
a Windows PIF file (MS-DOS Prompt Application) command line, or/and at
the plain MS-DOS prompt.
COMMAND.COM /Z displays the "ERRORLEVEL"
return code messages after executing each external DOS command (internal
DOS commands don't display error codes).
This switch can be used on the
CONFIG.SYS file SHELL= line. Example:
SHELL=C:\COMMAND.COM
C:\ /E:512 /P /Z
COMMAND /Z can also be used on
a Windows PIF file (MS-DOS Prompt Application) command line, or/and at
the plain MS-DOS prompt.
You'll see a message like this
one when using the "/Z" parameter (errorlevel 0 is the normal/default return
code):
"Microsoft(R)
Windows 95
(C)Copyright
Microsoft Corp 1981-1996.
Return code
(ERRORLEVEL): 0
WARNING:
Reloaded COMMAND.COM transient"
EMM386.EXE HIDDEN PARAMETERS
EMM386.EXE's detection code searches
for the presence of a Token Ring network adapter. This detection code may
cause some computers to hang. The NOTR switch can be used to disable this
search.
This switch is valid ONLY for EMM386.EXE
versions 4.45 - 4.49 [MS-DOS 6.00 - 6.22] up to 4.95 [MS Windows 95 - 98,
a.k.a. MS-DOS 7.00 - 7.10a].
Example:
DEVICE=C:\WINDOWS\EMM386.EXE
NOTR
FDISK.EXE HIDDEN PARAMETERS
FAT16 is [R.I.P.! :-)] the most
used File Allocation Table standard on "Wintel" PCs, recognized by all
MS-DOS releases begining with 4.00, and by all MS Windows versions.
MS-DOS releases older than 4.00
operate with the older FAT12 standard, discontinued. FAT12 was able to
handle partitions up to 16 MB (with a 4 KB cluster size).
FAT16 limitations:
- maximum partition size = 2 GigaByes
(GB) = 2,048 MegaBytes (MB);
- (too) large cluster size, which
wastes a lot of disk space, by allocating 1 cluster to each file on disk,
even if a file is at least 1 byte in length. Another example: a 33 KB file
has 2 clusters assigned on a disk partition with 32 KB clusters, thus wasting
31 KB because 2 files do NOT share the same cluster:
Partition size: FAT16 Cluster size: ------------------------------------------- 0 - 127 MB 2 KB = 2048 B 128 - 255 MB 4 KB = 4096 B 256 - 511 MB 8 KB = 8192 B 512 - 1023 MB 16 KB = 16384 B 1024 - 2047 MB 32 KB = 32768 BBegining with the release of Windows 95B OSR 2.0, Microsoft introduced a new File Allocation Table standard: FAT32, which extends these limits:
Partition size: FAT32/FAT32X Cluster size: -------------------------------------------------- 0 - 259 MB 512 B[*] 260 - 511 MB 1 KB = 1024 B[*] 512 - 8191 MB 4 KB = 4096 B 8192 - 16383 MB 8 KB = 8192 B 16384 - 32767 MB 16 KB = 16384 B 32768 MB - 2 TB 32 KB = 32768 B [*] = ONLY if using: FORMAT drive: /Z:n!Therefore FAT32 wastes a lot less disk space, preserving speedy disk access the same time.
PROs + CONs:
WARNING:USE ANY OF THESE PROGRAMS WITH CAUTION: BACKUP YOUR DATA TO A SAFE LOCATION FIRST!
3rd party disk partitioning tools that provide support for FAT32X:
Download the FAT32 Evaluation Tool, included on the MS Windows 98 Setup cd-rom [56 KB, free]. This Windows 98/OSR2 disk utility shows all your drives/partitions, their characteristics, sizes and the disk space you would save if you decide to convert an existing FAT16 partition/disk to FAT32.
UPDATE:
"Thanks for the FAT32 analysis - very comprehensive and understandable.
I have only one suggestion:
You might consider a mention of
users with Compressed Hard Drives who cannot use FAT32 and for whom Partition
Magic is of little use. Of course, this applies to older machines with
their small hard drives, but I read that the average age of PCs in use
is about 3 years with many machines well past the 5 year mark. Many of
these probably can't or don't run Win9x for various reasons, but for those
who do, the substitute to FAT32 is DriveSpace which comes with Microsoft
Plus! for Win95 [the Desktop Themes and Pinball game are just space-wasting
fluff to those with little hard-drives]. As a result of using DriveSpace
[on a 250MB hard drive] the cluster size on C: is 8,192 bytes and on H:
[C:'s Host drive] is 4,096 bytes. The other caveat - minimize cluster waste
by deleting unused files, zip several files together where appropriate
and send files/programs off to portable drives if possible. If the user
is stuck with a small hard-drive apply a "hard-drive" worthy test to every
file that is added."
This update courtesy of Ojatex
(Ojatex@aol.com).
Below are detailed only the UNDOCUMENTED (hidden) FDISK parameters.
IMPORTANT:
To become familiar with FDISK.EXE's command line switches (the documented
ones anyway), run:
FDISK /?
from any DOS prompt, to display
the FDISK.EXE help screen.
FDISK /FPRMT enables the use of
FAT32 file system on hard disks/partitions smaller than 512 MB, normally
not allowed by default!
NOTE:
Use it with CAUTION ONLY from the native MS-DOS command prompt, NOT from
a DOS box/session, even full screen, inside the Windows 9x GUI!
FDISK x /PRI:ps /EXT:es /LOG:ls
meaning:
x = drive number: 1, 2, 3... etc.
Drive 1 corresponds to the 1st hard disk installed on your machine: C,
D, E... etc.
/PRI:ps = creates a primary partition
of size... (in MegaBytes).
/EXT:es = creates an extended partition
of size... (in MegaBytes).
/LOG:ls = creates a logical drive
in the extended partition of size... (in MegaBytes).
If using FAT16, the maximum size...
allowed is 2,047 MB (2 GigaBytes).
If using FAT32, the maximum size...
allowed is 2,047 GB (2 TeraBytes).
NOTES:
FDISK /MBR repairs a damaged boot sector by overwriting it with a fresh copy, writing a new Master Boot Record to the boot hard disk without altering the partition table information.
WARNING: Writing the master boot record to the hard disk in this manner can render certain hard disks partitioned with SpeedStor unusable! It can also cause problems for some dual-boot programs (including Windows 95), or for disks with more than 4 partitions !!!
The DEFINITION
of MBR: at the end of the ROM BIOS bootstrap routine the BIOS will
read and execute the first physical sector of the first floppy or hard
drive on the system.
This first sector of the hard disk
is called the Master Boot Record (MBR), or Partition Table, or Master Boot
Block. At the beginning of this sector of the hard disk is a small program.
At the end of this sector is where the partition table is stored. This
program uses the partition information to determine which partition is
bootable (usually the first primary DOS partition) and attempts to boot
from it.
NOTE:
The largest partition MS-DOS begining with release 3.00 and up to Windows
95a OSR1 versions of FDISK can create/recognize is 2 GB (GigaBytes).
The 2 GB partition limit has been
overcome by Microsoft (FINALLY!), begining with Windows 95B OSR2. Named
the FAT32 file system, it supports partitions/drives up to 2 TB (TeraBytes).
Windows NT has its own 32-bit protected
file system called NTFS, INCOMPATIBLE with FAT32!
WINDOWS 95 [retail] AND 95a OSR1 [upgraded with SP1] USERS: THE "MBR REFRESH" ISSUE!
UNDOCUMENTED! There is a problem
when installing a new hard drive on your system under Win95. If you upgraded
from MS-DOS 5.0 (or earlier), your primary hard disk, formatted under your
old version of DOS, contains the MBR (Master Boot Record, also called the
boot sector) written by the hard disk formatting utility (FDISK) provided
by MS-DOS. When you add another hard disk under Win95, you format and partition
it with the Win95's (MS-DOS 7.00) version of FDISK.
This means that each drive was
formatted and partitioned under a different OS. Windows 95 WON'T RECOGNIZE
YOUR DRIVE! There is nothing wrong, don't panic. :) It's "just" another
glitch in the OS, something Microsoft overlooked!
When a drive is formatted/partitioned
under Win95, the MBR tells the OS that the drive is a Windows drive. If
your drive was formatted/partitioned under an earlier version of MS-DOS
(3.0 and up), the drive is recognized as an MS-DOS drive.
All you have to do, is to refresh
the MBR, by running FDISK (the Windows 95 version) with the UNDOCUMENTED
/MBR switch (repairs a boot sector by overwriting it with a fresh copy),
on the old drive. Just run:
FDISK /MBR
C:
The boot record (MBR) will be refreshed
without reformatting the drive!
I presumed that your primary (old)
hard disk has assigned the letter C (single logical partition), and your
new (secondary) hard disk is D (also with a single logical partition).
Change the drive letters if different on your system (and if you have more
than one partition per each hard disk).
This can ONLY be done from the
real mode MS-DOS prompt, after you exit Win95 to MS-DOS (or when you boot
with the "Command
prompt only" option from the bootup menu).
NOTE:
Looks like the "MBR BUG" does NOT affect OSR2 or Windows 98.
If the Win95 OS doesn't recognize
the new drive, then you can ONLY do this after rebooting into the old MS-DOS
OS (using the dual-boot feature implemented into Win95 OS). This means
that you need to have kept your old MS-DOS 6.xx files (including FDISK)
on your primary (old) hard disk.
You also need to have kept the
old drive as primary (master) and setup the new one as secondary (slave).
Reboot your system when done. Your
(newly installed) hard drive should be recognized by the OS from now on.
Now you can change the new drive
to "master" (primary boot drive) and setup the old one as "slave", especially
if the new one is faster.
Sounds pretty complicated, but
you may have to do this some day, and it's better than reformatting the
entire drive, and losing precious data.
There is still another way to refresh
the MBR. Run Win95's Scandisk utility for ALL hard drives on your system.
Scandisk will automatically refresh the MBR on your drives, as needed (if
the MBR is damaged).
IMPORTANT:
Read this related article published
in
Magazine, the August 1996 issue, at the bottom of page 52, under the
"Bug Watch" logo. Title: "Trouble
With Windows 95's Disk Partitioning". It details the same topic above.
Another recommended
article:
"Detect
Buggy Partitions" (from the April 1997 issue).
Check out
web site frequently for online up to date OS info/bug reports.
UPDATE:
There is a great tool that can overcome the above Windows 95 limitation,
and make ANY hard drive compatible with ANY operating system and ANY FAT
system (and much more), called Partition Magic by Powerquest.
Retails for about 30-50 bucks at popular computer stores (it's worth every
penny, it saved my "computing life" more than once).
Partition Magic new version 4.0
supports OSR2/Win98 FAT32/FAT32X and WinNT 32-bit NTFS file system standards.
FDISK /Q prevents rebooting the computer automatically after altering the partition information by using FDISK with other parameters.
FDISK /STATUS displays a screen similar to using FDISK's option 4: "Partition information", but also includes EXTENDED partition information.
FORMAT.COM HIDDEN PARAMETERS
This parameter makes FORMAT.COM check for the existing format of your disk, unless the /U (UNCONDITIONAL) parameter is also used [MS-DOS 5.00 - 6.xx ONLY], and then proceeds with an UNATTENDED DISK(ETTE) FORMAT:
This FORMAT.COM parameter works exactly like /AUTOTEST, but it DOES prompt the user for a volume label, and it DOES display disk space information upon completion.
This FORMAT.COM parameter is similar
to using the MIRROR command [MS-DOS 5.00 and earlier ONLY!].
NOTE:
Microsoft removed MIRROR.COM from all MS-DOS releases begining with 6.00.
This FORMAT.COM parameter performs
an UNCONDITIONAL format, which DESTROYS
every byte of data on ANY hard disk/floppy by overwriting it with hex F6h.
WARNING:
You canNOT UNFORMAT a disk(ette) formatted
using the /U option!
This particular combination of FORMAT.COM
parameters makes a disk(ette) UNREADABLE!
WARNING:
DO NOT use these two FORMAT switches TOGETHER on ANY drive!
FORMAT drive: /Z:n formats a FAT32
drive with a cluster size of n times 512 Bytes.
Meaning:
drive: = your hard drive letter:
C:, D:, E:... etc.
n = number of sectors per cluster
multiplied by 512 = cluster size in Bytes.
Examples:
n = 1 creates a 512 Bytes cluster;
n = 2 creates a 1024 Bytes (1 KB)
cluster;
n = ? creates a ? x 512 = ????
Bytes (???? Bytes : 1024 = ? KB) cluster.
You can modify the size of the
allocation units (sectors) on a FAT32 drive to your heart desire.
WARNING:
It is recommended NOT to change the default cluster size, because some
programs such as disk-repair/anti-virus tools might NOT work properly!
HIMEM.SYS HIDDEN PARAMETERS
The HIMEM.SYS /Q parameter (QUIET)
does NOT allow the display of HIMEM.SYS loading status during bootup. Only
error messages will be shown, IF the:
Logo=0
line exists in MSDOS.SYS, under
the [Options] section, valid ONLY for Windows 95 - 98 OS.
This switch is valid ONLY for HIMEM.SYS
versions 3.10 [MS-DOS 6.xx] up to 3.54 [MS Windows 9x].
Example:
DEVICE=C:\WINDOWS\HIMEM.SYS
/Q
MEM.EXE HIDDEN PARAMETERS
MEM /A [MS-DOS 6.00 and above ONLY!]
MEM /A (ALL) displays a short summary
screen of your memory configuration and also the status of the HMA.
HMA (High Memory Area) is a little
known 64 KB area just above the first MegaByte (1 MB = 1,024 KB = 1,048,576
Bytes) of RAM mapped by Microsoft HIMEM.SYS memory manager (or another
3rd party upper/extended/expanded memory manager, like Quarterdeck QEMM386,
Helix NetRoom RM386, Qualitas 386MAX etc).
Part of DOS module itself and of
MS-DOS BUFFERS usually load into the HMA.
Example of MEM /A output display
(only the HMA info is shown here):
"Available space in High Memory Area 1K (944 bytes) MS-DOS is resident in the high memory area."To display ALL available memory configuration at a DOS prompt, run:
VER HIDDEN PARAMETERS
VER is an internal MS-DOS command,
built into COMMAND.COM. An actual file does not exist.
VER /R (REVISION) displays extended
DOS info:
"Windows 95. [Version 4.00.1111]"
Example of screen output for VER /R command (using Win95B OSR2 + MS-DOS 7.10):
"Windows 95.
[Version 4.00.1111]
Revision
A
DOS is in
HMA"
WIN.COM HIDDEN PARAMETERS
WIN /W generates this message:
"Press any
key to continue...
Pressing
a key reboots the system back to Windows 95/98."
waiting for user input (key press),
and then restarts the computer (warm reboot), restoring the original CONFIG.SYS
and AUTOEXEC.BAT files in the root directory of the boot drive from CONFIG.WOS
and AUTOEXEC.WOS (if any). This is useful when the computer is restarted
after interrupting a "single" mode MS-DOS session, because of this CONFIG.SYS
line:
DOS=SINGLE
which does NOT allow Windows 98/95
GUI to load.
This switch works ONLY if executed
from the native/real/true MS-DOS mode OUTSIDE the Windows 98/95 GUI, NOT
from WITHIN Windows 98/95 in a DOS prompt/box/session.
NOTES:
WIN /WX automatically restarts the
computer (warm reboot), without prompting or waiting for input (key press),
and restores the original CONFIG.SYS and AUTOEXEC.BAT files in the root
directory of the boot drive from CONFIG.WOS and AUTOEXEC.WOS (if any).
This is useful when the computer is restarted after interrupting a "single"
mode MS-DOS session, because of this CONFIG.SYS line:
DOS=SINGLE
which does NOT allow Windows 98/95
GUI to load.
This switch works ONLY if executed
from the native/real/true MS-DOS mode OUTSIDE the Windows 98/95 GUI, NOT
from WITHIN Windows 98/95 in a DOS prompt/box/session.
NOTES:
WIN : starts Windows 3.xx or Windows
for WorkGroups 3.1x WITHOUT displaying the startup logo (RLE encoded, 16
colors).
This switch works ONLY if executed
from the native/real/true MS-DOS mode OUTSIDE the Windows/WfWG GUI, NOT
from WITHIN Windows/WfWG 3.xx in a DOS prompt/box/session.
WARNING:
The "WIN :" switch may cause sudden lockups
with some older video controllers!