MAINTAINING WINDOWS SYSTEMS ENVIRONMENT

1.3.5 MAINTAINING WINDOWS SYSTEMS ENVIRONMENT

This topic describes the basic steps required to provide proper periodic maintenance to the operating system and data files contained on a Windows-based computer.

Perform the following:

• Provide an appropriate level of virus protection. • Remove old and unused files on a regular basis and keep adequate open space on disks

used for virtual memory. • Scan the media for errors and fix any problems. • Defragment the drives. • Back up files and keep updated recovery disks. • Periodically check for updates, and apply them as appropriate.

1. VIRUS PROTECTION

Viruses are nasty little programs that can wreak havoc on a computer and its data. The sole purpose of a virus is to replicate itself and make life miserable for computer users.

Many viruses are simple annoyances, but some of them can cause irreparable harm to files. Viruses can be caught from various sources including shareware, files downloaded from the Internet, software from unknown origins, and bulletin boards.

There are several different types of viruses: • File infectors attach themselves to executable files and spread to other files when the

program is run. • Boot sector viruses replace or hide inside the master boot record (or boot sector on a

floppy disk). They write themselves into memory any time the computer is booted. • Trojan horses are disguised as legitimate programs, but, when loaded, they begin to harm

the system. • Macro viruses attach themselves as executable code inside a document (such as a

Microsoft Word document) and run when the document is opened. (They can also attach themselves to certain kinds of e-mail.) It used to be true that you couldn't get a virus from opening a document; running a program was required. Unfortunately, this has changed thanks to the widespread use of macros by computer users. Although macros are very valuable, they mean that when you open a document you are running a program.

• Polymorphic viruses are an especially unsettling class of invader. They're designed to modify themselves over time and replicate new forms. This makes them both

unpredictable and harder to detect.

The following are some general guidelines for virus programs:

• Make sure your choice is compatible with the specific version of Windows on the system, including any upgrades. The wrong antivirus program might do more damage than good. • If the computer has a BIOS setting that allows you to disable boot-sector writes (prevent

applications from writing to the boot sector of the hard disk), consider enabling it. This setting must be disabled before installing Windows updates and some other programs as well. Keep in mind these BIOS-level virus checkers are very limited in ability and should not be relied on for total protection.

• Viruses are often transmitted by floppy disks. Be careful when reading a floppy disk of unknown origin or using your disk on an unfamiliar machine.

• Currently, many viruses and macro viruses are transmitted over the Internet. Use extreme caution when you download files, especially if they come from sources other than a

manufacturer's Web site. The most secure protection against Internet-distributed viruses is to have an antivirus program running at all times (or at least when you're downloading and first running new files).

• Trust no one when it comes to loading programs on your machine. Be aware that any program you load on your computer could contain a virus.

• Be sure to keep your antivirus program updated. Hundreds of new viruses are written and transmitted each month.

When designing an antivirus program, you need to take into consideration the needs of the user and the level of risk. A computer that does not have a connection to the Internet or a LAN (local area network) and rarely receives files from outside sources is at little risk.

A file server that gets files from a variety of sources, some downloaded from outside, should

be equipped with very robust virus detection. In the latter case, it's good if the software has the capability to alert a system administrator with an e-mail message or page when a virus is detected.

2. DISK CLEANUP

Cleaning up old files not only saves on media and reduces copy time during backups; it also frees up disk space and improves file system performance.

Latest Windows offer Disk Cleanup wizards available on the System Tools menu that make cleaning up old files on a disk easy.

Simply invoke the routine and direct it to the desired drive. Wait for the utility to prepare a list of various temporary files, unnecessary program files, files that have been moved to the Recycle Bin, and Internet files that are cached locally on the disk.

You can then determine which of these files you wish to delete. Simply click OK and the files are removed. Figure on the right shows the wizard ready to delete the files.

3. CHECKING DRIVE INTEGRITY WITH SCANDISK

ScanDisk is an incredibly useful program, and, in the early days of MS-DOS, many people bought utilities like this to keep their system running properly. It inspects the file system and fixes problems and can do so when the system is in use.

ScanDisk is built into all the currently shipping versions of Windows. You should be very careful to make sure that any version of ScanDisk you use is actually the one that is compatible with the version of Windows and the file for the PC to be checked and corrected.

On most systems, ScanDisk is available in both a command-line version and one that operates within the Windows graphical user interface (GUI).

The ScanDisk utility can both detect and fix problems on local hard disks, floppy drives, RAM drives, and some memory cards. It works with compressed drives set up using DoubleSpace and DriveSpace, but offers only limited support for third-party compression software.

Among the operations you can perform on a ScanDisk are:

• Inspecting the physical surface of the drive for bad sectors • Inspecting the file structure, compression structure, and volume signatures of any

compressed drives

• Locating and repairing crossed-linked files and lost clusters • Verifying the integrity of both FAT16 and FAT32 file systems • Verifying and repairing problems with the directory

tree structure of a drive

ScanDisk operates in two modes:

1. Standard performs a check of both files and folders;

2. Thorough mode adds an inspection of integrity of the drive's physical surface.

You can set ScanDisk to run automatically and fix errors or to prompt you before making any corrections (see figure on the right).

4. KEEPING FILES ORDERLY WITH DISK DEFRAGMENTER

Disk Defragmenter is a utility you access by clicking Start\Programs\Accessories\ System Tools\, and it is found in all current versions of Microsoft Windows.

It can be used to analyze a disk and see just how badly fragmented the files are, and then it can rearrange the disk, placing the files in contiguous blocks.

The newest versions of Disk Defragmenter have logic that makes them aware of the way the operating system reads executable and dynamic-link library (DLL) files, so they can place clusters in the order they are read.

Both of these operations can significantly improve system performance. This utility should be run at least monthly, and more often on busy systems.

Any time a computer user complains of a slowdown over regular system performance, fragmentation analysis should be performed. Figure on the right shows the Windows program in operation, “Disk defragmentation in process”.

As you can see, it works with both NTFS (Windows NT file system) and file allocation table (FAT)-based file systems.

You can schedule the defragmentation to take place when the computer is not being used, so the speed of its operation is generally not a concern.

Some screen savers or other programs that involve disk activity can slow down the operation of the defragmenter, so for best performance they should be disabled during its operation. Windows offers a Maintenance Wizard to automate this and other common disk care tasks.