CIS 106a: Introduction to Operating System Concepts

Chapter 3: Maintaining Windows 2000/XP

 

Objectives:

This chapter is about fine tuning Windows 2000 and Windows XP. Objectives important to this chapter are:

  1. Installing and managing hardware and programs in W2K and XP
  2. Protecting and maintaining OS files
  3. Introduction to the registry in W2K and XP
  4. Optimizing W2K and XP
Concepts:

Before you can install hardware or software, realize that you must have the proper rights to do so. (It is a case of rights, not permissions, since it affects the entire computer.) In general, you may need to be a system administrator. The text tells us that a user may be able to install a device if the driver for the device asks no questions while it is being installed, if all necessary files are present (e.g. on an install CD), if the driver is digitally signed, and if nothing goes wrong. If any of these statements are not true, administrator rights may be needed to correct the problem.

You usually install a device first, then install a driver. Most of the time you allow Windows to notice a new device, and allow it to offer a driver for it. However, sometimes the correct procedure is to install a device driver first, which you cannot know unless you read the instructions for installation of the device. This will be a foreign concept to many of you, I am sure. Trust me, there is something to be gained by reading the instructions first.

If the device you are installing is to be installed first, physically install it, then turn on the PC and start Windows. A wizard should start once Windows notices the new hardware, and offer a driver or ask you to supply one. It is common for some hardware, such as HP printers, to come with an installation disk, and instructions to run the install program on the disk. While this procedure may work, users are often much happier if they install drivers through the Windows wizard instead. (Trust me: the printer wanted to reinstall itself at every reboot until I did this.)

The text turns to installing hard drives. When installing a hard drive, you will typically have to format it, and you may want to partition it. You can use the setup utility to do this. Once the hard drive is installed, you can use several utilities to manage it:

  • Right-click My Computer, and choose Manage. In the new window, choose Disk Management. This utility can format, partition, create volumes (drive letters), and change basic disks to dynamic disks. Your text offers two other ways to run this utility:
    • Open Control Panel, choose Administrative Tools, choose Computer Management, and choose Disk Management
    • Click Start, Run, and enter diskmgmt.msc
  • Use Windows Explorer
  • Use DISKPART or FORMAT from the command line

The text suggests some reasons for partitioning or formatting a disk:

  • New hard drives must be formatted before use, to put the desired file system on them
  • Re-partitioning a disk will remove all data from it, useful if you can't find the source of a recurrent problem

Users who report problems to technicians often need a bit of prompting from the technician before those users provide any useful troubleshooting information. When talking to the user, try this:

  • Ask the user about the problem: what happened, when, and what were they doing?
  • Identify recent changes to the system
  • Make an initial diagnosis, and be ready to change your idea about the problem as you get more information
  • Document symptoms, actions you take, and the outcome of each action

If there is a problem with a specific device, try the basics remedies:

  • Reboot the computer - sometimes this clears a problem with memory
  • Uninstall the device, reboot, and reinstall drivers for it (you cannot reinstall drivers unless you uninstall the device first)
  • Update device drivers - it may be that you changed your OS and a new driver is needed. You should review the method for updating explained in your text. Rolling back a driver is done in a similar way.
  • Return to an earlier restore point - restore points are a great feature; they allow you to turn back the clock to a time before a bad change took place

If you are having a problem with a driver, you should make sure that the hardware and its driver are certified by Microsoft as being compatible with Windows. Microsoft often advises users to download new drivers from hardware manufacturers, but they also have drivers on their own web site for many hardware devices. Using the Microsoft supplied driver may avoid problems.

According to the text, you can determine whether a driver is certified three ways:

  • Use the File Signature Verification tool (Sigverif.exe)
  • Use the Driver Query tool (Driverquery/si > myfile.txt) - this command saves the output of the utility in a file called myfile.txt
  • Use the Device Manager (Driver Details)

When you install software, like hardware, you have two main ways to do it:

  • Under Control Panel, run Add or Remove Programs
  • Use the install disk that came with the program

Some older programs (legacy programs: we inherited them from someone) do not run well in Windows XP. If this happens, look for an update from the publisher, or determine what version of Windows it was supposed to run under, and tell the program it is running under that version with XP's Compatibility Mode utility. (If you have a shortcut to the program, right-click the shortcut, choose Properties, and make settings on the Compatibility tab.)

The text offers a cookbook list of things to try if you are having trouble with a program:

  • Use the Error Reporting service - many people never send an error report to Microsoft, but if you do, sometimes they offer a solution immediately
  • Try a reboot, as stated above
  • Scan for viruses - you never know
  • Run Windows Update - sometimes there is a patch you need that you know nothing about
  • Free up system resources - more RAM is always good; try closing some programs
  • Uninstall and reinstall the application - this will help if your installation was flawed
  • Run or install the application under another user account - if the problem is too few rights, try installing under the administrator account
  • Create a new data file - a corrupt data file will keep many programs from running
  • Try restoring default settings - sometimes a seemingly harmless configuration setting will keep a program from running, like a screen resolution that your system can't provide

The text changes topics and discusses several terms related to diagnostic and management software:

  • Console - a window that contains one or more administrative tools; if you right-click My Computer and choose Manage, you will see the Computer Management console
  • Snap-in - an individual tool placed in a console; the Disk Management tool in the Computer Management console is a snap-in
  • Microsoft Management Console (MMC) - Used to build customized console windows
    • Files are saved with .msc extension; e.g. Compmgmt.msc
    • Administrator privileges are required to use functions
  • Event Viewer (Eventvwr.msc) - another snap-in, it keeps three event logs: application, security, and system (you may want to look at each when troubleshooting); events in the logs are tagged as information, warning, or error events: watch closely for errors
  • System State - the files that are necessary to loading you operating system: the actual boot files, the registry, and the files in your %SystemRoot% folder. This last "folder" is the name of a variable defined on every Windows computer. It refers to the folder that holds all the files that run Windows. The actual folder name varies from one version of Windows to another.

Windows XP and 2000 have additional support tools on their installation CDs, in the \support\tools folder. Some features that protect files are standard:

  • Windows File Protection - WFP prevents critical system files from being overwritten except by processes that are expected to do so, such as applying OS patches. Files protected: .sys, .dll, .ttf, .fon, .ocs, or .exe Copies are kept in C:\%SystemRoot%\system32\dllcache; copies are compared to the live version, and the live version is overwritten with the copy if a change is detected.
    System File Checker (SFC) is a feature used by WFP to check files after an unattended install.
  • System Restore - a feature in XP, it allows you to manually set Restore Points, which are saved copies of your registry. The system makes these copies itself from time to time. It is recommended that you create a Restore Point before you make any major change to the system, so you can restore your system to that condition if things go wrong. This will not uninstall software or clean a virus, but it does not delete data files. It puts the registry back to an earlier state. To use the feature:
    1. Click Start.
    2. Point to All Programs.
    3. Point to Accessories.
    4. Point to System Tools.
    5. Click System Restore.
    6. Follow the instructions on the wizard.
  • Back up the system state - regular backups are recommended for all computers
  • Automated System Recovery - ASR is a feature in XP that assists in making a backup of your system and restoring from that backup

Having made reference to it several times, the text finally tells you something about the Windows registry. The registry is a database of information about a system, its hardware, and its software. Most programs and drivers that run under Windows require an entry in the registry and rely on it for their configuration settings.

The registry is logically organized in a tree-shaped hierarchy. Its six major branches are called keys. Each key holds subkeys, which hold values or other subkeys. The registry is physically organized in five files called hives. (At this point, the reader who is familiar with any other aspect of computing will feel an irresistible urge to beat Bill Gates with whatever heavy object is handy. Breathe in... breathe out. The urge will pass.)

The hives are stored in %SystemRoot%\system32\config. The text tells us that the key called HKEY_PERFORMANCE_DATA does not use a hive. When you back up the registry, you can back up the whole thing, or just specific keys using the registry editor. It is interesting that the instructions on the page this paragraph links to are missing a critical word. To run the registry editor, click Start, Run, type regedit, and click OK. (Microsoft forgot to put the name of the program on their web page.) Do NOT make any changes with the registry editor unless you know what those changes will do.

Windows also contains tools to automate tasks and to optimize how you need it to work. Some tools will be of more value than others to different users.

  • Task Manager - press ctrl-alt-delete to access it; use it to view running application and processes, to check performance, to end processes or applications if needed, to shut down system if other methods are unavailable
  • System Configuration Utility - better known by its executable name, msconfig; click Start, Run, enter msconfig, and click OK. Use it to control what configuration files are used at startup, to edit configuration files, and to keep programs from running that currently run at startup
  • Services Console - click Start, Run, enter services.msc, and click OK; use this to see what services are running and to manage them
  • Add or Remove Programs - as noted above, use this to install programs and to remove installed programs that are no longer needed; removing unneeded software frees space on your hard drive. Be aware that Windows runs best when your hard drive is half empty. (You do not use this utility to install or remove drivers.)
  • Virtual Memory Manager - an interface between software and physical/virtual memory; it provides a set of memory addresses to each program
    • Memory is allocated in 4KB segments called pages
    • Pages are stored in RAM or swap file on hard drive (virtual memory)
    • If drive space is limited, limit maximum size of page file
    • If RAM space is limited, expand page file size to 4 GB
    • Spread page file over several physical devices if necessary; avoid this is possible
    • Do not completely eliminate virtual memory