MS-DOS (DOS) AND THE 2000XP COMMAND PROMPT


MS-DOS (DOS) AND THE 2000/XP COMMAND PROMPT

The Microsoft Disk Operating System (MS-DOS) is Microsoft’s original OS. It is a variation of the OS used on the original IBM PC back in 1981. It is a 16-bit OS. It is not necessary to understand exactly what the terms 16 and 32 bits mean in relation to OSs. It is enough to know that 32-bit systems are much more capable and less troublesome than their 16-bit predecessors. The original consumer versions of Windows (1.0–3.11) were 16-bit OSs. They were actually nothing more than graphical interface shells that used DOS as the OS. Windows 9x versions are 32-bit OSs that still make use of DOS, while 2000 and XP are true 32-bit OSs. You’ll notice that the command prompts in 9x are called “MS-DOS Prompt,” while the other two versions’ command prompts are called “Command Prompt.” This means that while the 9x command prompts actually use DOS, the 2000/XP command prompts are 32-bit programs that emulate DOS. 2000 and XP can run many 16-bit programs that don’t attempt to access hardware directly; they have built-in emulators for DOS and Windows 3.x programs.

Note

In 2000 and XP, when you access the command prompt from Programs (or All Programs) > Accessories, or if you type cmd in the Run dialog, you get the 32-bit DOS emulation program. However, if you type command in the Run dialog, in most cases you get actual DOS.

There are four different ways to run a 9x computer in DOS:

  1. Reboot to DOS: Go to Start > Shut Down and select the “Restart the computer in MS-DOS mode” option button (95 and 98 only).

  2. Use the MS-DOS prompt: Go to Start > Programs > MS-DOS Prompt (95 and 98), or Start > Programs > Accessories > MS-DOS Prompt (Me).

  3. Boot to a DOS disk: Use the emergency boot disk or a rescue disk from software such as an antivirus program to boot the computer.

  4. Boot to Command Prompt or to Safe Mode, Command Prompt Only: Safe Mode is described earlier in this chapter. Power on the computer, press F8 repeatedly as soon as it starts to boot, and select either of these options from the boot menu (95 and 98 only).

So, what is the purpose of using text-based commands on Windows machines? There are several uses from a repair standpoint. First, many utilities have no graphical interface so they must be controlled with commands. Second, there are times when it is necessary to boot into DOS to fix problems that can’t be fixed in Windows 9x. For example, an earlier section discussed running ScanDisk in DOS when Windows wouldn’t boot because of a hard disk problem. Certain procedures, such as restoring damaged registries, must be done in DOS. Remember, early PCs ran on DOS alone, so DOS has many commands to manipulate files, folders (which it calls directories), and disks. A program called FDISK is necessary to format and partition as well as view the status of hard disks. We discuss FDISK in Chapter 6. Some DOS files, including config.sys and autoexec.bat among others, are still used to varying extents in all versions.

Tip

You can use an emergency boot disk to start a 2000/XP machine, but the default hard drive file system on those OSs, NTFS, is not compatible with DOS disks. Therefore, you won’t normally be able to do anything useful unless at least one of the disk partitions is formatted as FAT or FAT32. However, there is a freeware utility available called Active@ NTFS Reader for DOS from ntfs.com that will allow you to read but not write files on an NTFS partition while in DOS. You can copy this utility to any 9x boot disk and use it to boot the computer. Then, you can start the utility and use it to read files. If there is a FAT partition available on the machine, or if there is room on the boot disk, you can copy a file to it. You can also run this utility from Windows 9x in the event you have a 9x machine with an NTFS partition.

Paths

The system of paths used by all versions of Windows originated in DOS. A typical path looks like the following:

C:\Documents and Settings\User\Documents\long file name A.tiff

where C:\ represents the C partition on the hard drive, Documents and Settings is the top-level folder, User and Documents are subfolders, and long file name A.tiff is a file. Note, however, that this path is not a valid DOS path. In DOS, all file and directory names must fit the 8.3 standard. 8.3 means that directory names have a maximum of eight characters, and filenames have a maximum of eight characters followed by a maximum three-character extension. The sample path, converted to 8.3, might look like this:

C:\DOCUME~1\USER\DOCUME~1\LONGFI~1.TIF

For more information on 8.3 conversion, go to http://support.microsoft.com, click the link for searching the Knowledge Base by article number, and enter the article number KB142982 into the search box.

Using DOS and Command Prompt Commands

Most DOS and Command prompt commands are simple to use. Unfortunately, most articles and the help files in DOS and command prompts describe these commands using excessive punctuation to delineate the portions that require substitution by actual information. Consequently, if you are not proficient in these commands and you are following one of these articles, you will likely type in punctuation that wasn’t intended to be there, resulting in nothing but error messages. Moreover, the instructions might not work, even when typed correctly. Here is an example of a badly described command, the ATTRIB command, which is used to view and set the read-only, archive, system, and hidden attributes of a file or folder/directory:

ATTRIB [+R|-R] [+A|-A] [+S|-S] [+H|-H] [[d:][drive:][path]filename][/S[/D]]

This is a typical description of a DOS command—too bad it doesn’t work as described. The actual command works only by first navigating to the file or directory you want to configure by typing CD SYSTEM after the opening C:\WINDOWS prompt where CD is the Change Directory command, and SYSTEM is the folder you want to navigate to. To use it to remove the Read Only, Hidden, and System attributes of the file ccapi.dll in C:\WINDOWS\SYSTEM, you would type the following after the C:\WINDOWS\SYSTEM prompt:

attrib -r -h -s ccapi.dll 

For more information on using DOS and command prompts, see Chapter 13 “Command-Line Tutorial.” You can also search the Internet for DOS tutorials or command-line tutorials. There is a good page at glue.umd.edu/~nsw/ench250/dostutor.htm#2a. Another good one is pcnet-online.com/content/general.htm. Select the appropriate articles from the list.




The A+ Certification & PC Repair Handbook
The A+ Certification & PC Repair Handbook (Charles River Media Networking/Security)
ISBN: 1584503726
EAN: 2147483647
Year: 2003
Pages: 390

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net