Online Book Reader

Home Category

CompTIA A_ Certification All-In-One Exam Guide, Seventh Edition - Michael Meyers [257]

By Root 1655 0


Don’t worry about understanding everything the SET command shows you, but do notice a line that starts with Path=. This line tells Windows where to look for a program (or batch file) if you run a program that’s not in your current folder. For example, let’s say I make a folder called C:\batch to store all of my batch files. I can run the PATH command from the command prompt to see my current path (Figure 15-27).

Figure 15-27 Using the PATH command to see the current path

I can then run the PATH command again, this time adding %PATH%;C:\batch (Figure 15-28). The %PATH% bit is a variable that represents what is currently in the path. By placing it before my batch folder, I am telling the path command to keep what is there and just add c:\batch. I can now place all of my batch files in this folder, and they will always work, no matter where I am in the system.

Figure 15-28 Using PATH to add a folder

* * *

NOTE In Windows 2000 and XP, you can edit the BOOT.INI file by using the Edit program. Just make sure you use ATTRIB first to turn off the System and Hidden attributes! In Windows Vista, the boot configuration data (BCD) store contains boot configuration parameters and objects that control how the operating system starts. You use the bcdedit.exe command-line tool to add, delete, and edit the objects and entries stored in the BCD store.

And Even More Tools, Utilities, and Commands

As a proficient IT technician in the field, you need to be familiar with a whole slew of command-line tools and other important utilities. The CompTIA 220-702 exam focuses in on several of them, and although many have been discussed in detail in previous chapters, it is extremely important that you understand and practice with CHKDSK, FORMAT, and SFC.

CHKDSK (/f /r)

The CHKDSK (Checkdisk) command scans, detects, and repairs hard drive and volume related issues and errors. You can run the CHKDSK utility from a command prompt with the switches /f and /r. The /f switch attempts to fix volume related errors, while the /r switch attempts to locate and repair bad sectors. To run successfully, CHKDSK needs direct access to a drive. In other words, the drive needs to be “unlocked.” For example, if you run CHKDSK /f /r and CHKDSK does not consider your drive unlocked, you will receive a “cannot lock current drive” message, meaning that another process has the drive locked and is preventing CHKDSK from locking the drive itself. After this, CHKDSK presents you with the option to run it the next time the system restarts (Figure 15-29).

Figure 15-29 The CHKDSK /f /r utility and switches on a locked drive

FORMAT

After the previous chapters, you should have an expert-level knowledge of (or, at the very least, a passing familiarity with) formatting and partitioning hard drives. Formatting, you may remember, is the process of wiping or preparing a disk to be partitioned so it can hold an operating system or data. We have already discussed the various built-in Windows utilities available to provide the formatting of drives, and you no doubt know that a myriad of third-party formatting tools are out there. In this chapter, you just need to become familiar with the FORMAT command and its switches.

The FORMAT command, you may have guessed, enables you to format disks from the command line. The very best way to familiarize yourself with FORMAT and its available switches is simply to enter FORMAT /? from the command prompt. Your results should be similar to those displayed in Figure 15-30.

Figure 15-30 Using Format /? at the command prompt

Although the new CompTIA A+ exams focus primarily on operating system formatting utilities and options, you should familiarize yourself with the FORMAT command and its switches by practicing them on a test system you are literally not afraid to wipe out. Besides, you never know what skeletons CompTIA may pull out of the closet.

SFC (System File Checker)

The Windows SFC (System File Checker), or simply SFC.exe, scans, detects, and restores important Windows system files, folders, and paths.

Return Main Page Previous Page Next Page

®Online Book Reader