Third Edition
Chapter 7
Under the Windows Desktop
McGraw-Hill
1
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Learning Outcomes
• Define the role of the registry in
Windows, and back up and modify
the registry when needed
• Describe the Windows startup
process
• Install and manage device drivers
• Troubleshoot common Windows
problems
2
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Understanding the Registry
• The Registry Defined
– Database of configuration settings for
•
•
•
•
•
3
Device drivers
Services
Installed application programs
Operating system components
User Preferences
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Understanding the Registry
• Automatic Registry Changes when:
– Windows starts up or shuts down
– Windows Setup runs
– Changes are mode through a Control Panel applet
– A new device is installed
– Any changes are made to the Windows
configuration
– Any changes are made to a user’s preferences
– An application is installed or modified
– Changes are made to application user preferences
4
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Adding a new device creates changes in the registry
5
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Understanding the Registry (cont.)
• Registry Files (hives)
– DEFAULT
– NTUSER.DAT
– SAM
– SECURITY
– SOFTWARE
– SYSTEM
6
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Understanding the Registry (cont.)
• Registry file locations
– C:\WINDOWS\SYSTEM32\CONFIG
• All but NTUSER.DAT
7
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Figure 7-1 This view of the CONFIG folder shows
registry files
8
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Understanding the Registry (cont.)
• Registry File Descriptions
– SYSTEM
• What to load at startup
• Order of loading at startup
• Settings for drivers, services, OS components
– SOFTWARE
• Settings for installed software
• Other configuration information
– SECURITY
• Security policies
9
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Understanding the Registry (cont.)
• Registry File Descriptions
– SAM
• Security Accounts Manager
• Local security accounts database
– DEFAULT
• User profile settings
• Used when no user is logged on
• Logon screen
10
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Understanding the Registry (cont.)
• Registry File Descriptions
– NTUSER.DATA
• User profile for a single user
• Application preferences, screen colors,
and more
• After a user logs on, that user’s NTUSER.DAT
is loaded
• Saved in top-level personal folder for the user
• Hidden file
11
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Figure 7-2 The default user profile used until a
user logs on
12
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Table 7-1 Locations of the Hives within the
Registry
13
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Understanding the Registry (cont.)
• Viewing and Editing the Registry
– View and edit the registry with REGEDIT.EXE
– Navigation similar to Windows Explorer
– Key: a folder containing settings and other keys
– Root keys: five keys at the top of the hierarchy
– Value entry: settings within a key
– Data type: format of a value entry
14
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Figure 7-3 The registry root keys
15
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Figure 7-4 Registry components
16
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Table 7-2 Contents of Registry Root Keys
17
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Table 7-3 Windows Registry Data Types (The
Short List)
18
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Understanding the Registry (cont.)
• Backing up the Registry
– Create a Restore Point
• Backs up the registry and the entire OS
– Use REDEGIT to back up all or a portion
• Use Export Registry File option
• Double-click on the .REG file to restore
19
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Understanding the Registry
Step-by-Step 7.01
Creating a Restore Point
in System Restore
20
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Back up a registry key and all its subkeys and values
21
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
The Windows Startup Process
• Phases of the Startup Process
– Power-on Self-test
– Initial Startup
– Boot Loader
• Windows XP Boot Loader Phase
– NTLDR reads BOOT.INI
• Windows Vista and Windows 7 Boot Loader Phase
– BOOTMGR (boot loader) reads BCD
– WINLOAD.EXE is OS loader
– Detect and Configure Hardware
22
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
The Windows Startup Process
• Phases of the Startup Process (cont.)
– Kernel Loading
•
•
•
•
•
NTOSKRNL.EXE loads into memory
Hardware abstraction layer (HAL) loads
System portion of the registry loads
Drivers required at startup load
Kernel initializes services and drivers
and loads other code
• Kernel switches Windows to GUI mode
• CSRSS.EXE user-mode code starts
• PAGEFILE.SYS created and WINLOGON.EXE started
23
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
This Windows 7 screen displays during kernel loading
24
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
The Windows Startup Process
• Phases of the Startup Process (cont.)
– Logon
• User Logon
• Program Startup
• Plug and Play Detection
25
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Figure 7-5 Log on to Windows 7
26
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
The Windows Startup Process
• Modifying System Startup
– Modifying System Startup for Windows XP
• BOOT.INI must be modified directly
or indirectly
• System Properties | Advanced |
Startup and Recovery
27
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Figure 7-6 The Advanced System
Settings in
Windows XP
28
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
The Windows Startup Process
• BOOT.INI for a Dual-boot System
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS=”Windows XP
Professional”/fastdetect
multi(0)disk(0)rdisk(0)partition(2)\WINNT=”Windows 2000
Professional”/fastdetect
29
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
The Windows Startup Process
• Simple BOOT.INI
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS=”Windows XP
Professional”/fastdetect
30
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
The Windows Startup Process
• Modifying System Startup for Windows Vista
and Windows 7
– Boot configuration database (BCD) is a
hidden part of the registry
• C:\BOOT\BCD
• Contains
–
–
–
–
31
Locale information
Location of the boot disk
Location of the Windows files
Other startup information
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
The Windows Startup Process
• Modifying System Startup for
Windows Vista and Windows 7
– Directly edit BDC using BCDEDIT
– Modify in Startup and Recovery dialog
32
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Understanding the Registry
Step-by-Step 7.02
Modifying System Startup
for Windows 7
33
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Installing and Managing Device Drivers
• Finding Device Drivers
– In addition to drivers that are available
on the Windows distribution CD, you can
find more current drivers:
• On the disc that came with the device
• On the Web site of the manufacturer
of the device
34
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Figure 7-7 A list of drivers for a device
35
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Installing and Managing Device Drivers
• Installing Device Drivers
– Windows comes with a huge cache of
device drivers
– Windows and virtually all devices for
PCs are plug and play
– Some devices require that you install
the driver before connecting the device
– Always read the instructions
36
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Installing and Managing Device Drivers
• Installing Device Drivers (cont.)
– Permissions
• Administrator privileges to install
– An administrator must log on for Windows XP
– Respond to UAC prompts in Windows Vista and
Windows 7
37
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Installing and Managing Device Drivers
• Installing Device Drivers (cont.)
– Signed versus Unsigned Device Drivers
• Code signing an encrypted digital signature
in the file
• Driver signing is code signing of device driers
38
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Installing and Managing Device Drivers
• Managing Installed Devices
– Disconnecting Devices
• Does not uninstall driver
• Use Safely Remove Hardware for storage devices
The Windows XP Safely Remove Hardware icon
39
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Figure 7-9 Safely Remove Hardware dialog box
40
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Figure 7-10 Select Safely Remove Hardware from
the hidden icons
41
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Figure 7-11 Select the device you wish to
disconnect
42
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Figure 7-12 Now it is safe to disconnect the
hardware
43
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Installing and Managing Device Drivers
• Managing Installed Devices (cont.)
– Devices and Printers
– Overview of most obvious devices
– Access to tools for each device
44
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Figure 7-13 The Devices and Printers page
45
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Figure 7-14 The Device Stage page for a printer
46
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Installing and Managing Device Drivers
• Managing Installed Devices (cont.)
– Using Device Manager to Manage Device Drivers
•
•
•
•
•
47
View and change device properties
Update device drivers
Configure Device settings
Uninstall devices
Roll back driver update
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Understanding the Registry
Step-by-Step 7.03
Getting to Know Device Manager
48
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Troubleshooting Windows Problems
• Troubleshooting with Modified Startups
– The Advanced Boot Options Menu
•
•
•
•
•
•
Repair Your Computer (Windows 7 Only)
Startup Repair
System Restore
System Image Recovery
Windows Memory Diagnostic
Command Prompt
– Safe Mode (three variants)
49
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Figure 7-15 The Windows Advanced Options
Menu for Windows XP
50
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Figure 7-16 The Windows Vista Advanced Boot
Options Menu
51
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Figure 7-17 The Windows 7 Advanced Boot
Options Menu
52
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Troubleshooting Windows Problems
• Troubleshooting with Modified Startups
– The Advanced Boot Options Menu (cont.)
• Safe Mode (three variants) (cont.)
– Safe Mode — loads only basic, non-vendor-specific
drivers
– Safe Mode with Networking — like Safe Mode, but
with network support
– Safe Mode with Command Prompt — Safe Mode
with only a command prompt as a user interface
• Enable Boot Logging
53
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Troubleshooting Windows Problems
• Troubleshooting with Modified Startups
– The Advanced Boot Options Menu (cont.)
•
•
•
•
•
•
•
•
•
54
Enable Low-Resolution Video
Last Known Good Configuration
Directory Services Restore Mode
Debugging Mode — very advanced (may be obsolete)
Disable Automatic Restart on System Failure
Disable Driver Signature Enforcement
Start Windows Normally
Reboot (Windows XP only)
Return to OS Choices Menu (Multi-Boot Only)
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Troubleshooting Windows Problems
Step-by-Step 7.04
Using Windows in Safe Mode
55
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Troubleshooting Windows Problems
• Troubleshooting with Modified Startups (cont.)
– Troubleshooting with System Configuration Utility
(MSCONFIG)
• Executable name: MSCONFIG
• GUI tool
• Temporarily modifies system startup
for testing scenarios
56
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Figure 7-18 System Configuration (MSCONFIG)
lets you test startup scenarios
57
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Troubleshooting Windows Problems
• Troubleshooting Device Problems
– Device manager shows a yellow exclamation
mark next to a device with a problem
– Problems include hardware, driver, or the
ability of the OS to automatically configure it
– For more information double-click the device
icon to open Properties
– The Device Status box may recommend an
action, such as updating
– Check out Driver page for a device
58
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Figure 7-19 A problem with a device
59
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Figure 7-20 The Device status box will describe
the problem and recommend action to solve it
60
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Figure 7-21 After installing the device driver,
Windows places the device under the Network
Infrastructure Device category
61
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Figure 7-22 The Roll Back Driver button is active
only after a driver update
62
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Chapter 7 Summary
• LO 7.1 Understanding the Registry
– The registry is a database of all configuration
settings in Windows. Avoid directly editing
the registry, because you can cause severe
damage. The Control Panel applets provide
a safe way to edit the registry.
63
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Chapter 7 Summary
• LO 7.1 Understanding the Registry (cont.)
– Windows creates the registry during
setup and modifies it any time a setup
or installation program runs after that,
and during startup and shutdown.
Windows also modifies it anytime it
installs a device driver and whenever
it configures any application, Windows
component, or device.
64
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Chapter 7 Summary
• LO 7.1 Understanding the Registry (cont.)
– Most of the registry is in several files,
called hives. They include SYSTEM,
SOFTWARE, SECURITY, SAM, DEFAULT,
and NTUSER.DAT. These are the permanent
portions of the registry.
– You view the registry in a hierarchical folder
structure in Registry Editor.
65
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Chapter 7 Summary
• LO 7.1 Understanding the Registry (cont.)
– A key is a folder object that can contain one or
more sets of settings as well as other keys.
– There are five top-level keys, or root keys.
– A key that exists within another key is called
a subkey.
– Settings within a key are value entries. Each
value entry has a name, type, and data.
66
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Chapter 7 Summary
• LO 7.2 The Windows Startup Process
– The phases of the Windows startup process are:
Power-on self-test (POST), Initial startup, Boot
loader, Detect and configure hardware, Kernel
loading, and Logon.
67
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Chapter 7 Summary
• LO 7.2 The Windows Startup Process (cont.)
– If necessary, modify system startup using
the Startup and recovery page in System
Properties. You can also modify the BOOT.INI
(Windows XP) and BCD (Windows Vista/
Windows 7) files directly to modify startup,
but only very advanced techs should do this.
68
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Chapter 7 Summary
• LO 7.3 Installing and Managing Device
Drivers
– A device driver is program code, created by
the device manufacturer, that allows an OS
to control a physical device. Look for device
drivers on the disk or CD that comes with a
device or at the Web site of the manufacturer.
69
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Chapter 7 Summary
• LO 7.3 Installing and Managing Device
Drivers
– You need Administrator privileges to install any
device driver in Windows.
– Once a device is installed, a standard user may
disconnect and reconnect the device without
restriction—the driver will not be uninstalled.
70
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Chapter 7 Summary
• LO 7.3 Installing and Managing Device
Drivers
– Code signing exists to avoid problems caused
by badly written code. It involves a digital
signature, provided by Microsoft as a seal
of approval of program code.
71
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Chapter 7 Summary
• LO 7.3 Installing and Managing Device
Drivers
– Always read the manufacturer’s documentation,
and follow the instructions before attempting to
install a device driver, whether it is plug-and-play
or not.
72
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Chapter 7 Summary
• LO 7.3 Installing and Managing Device
Drivers
– When an administrator installs or connects a
plug-and-play device to a Windows computer,
the computer will automatically detect the
device, and install and configure the driver
with little or no interaction from the user,
except to provide the device driver disk if
requested.
73
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Chapter 7 Summary
• LO 7.3 Installing and Managing Device
Drivers
– Plug-and-play devices connected to USB or
IEEE 1394 (FireWire) can be disconnected
without restarting Windows, but you should
use the Safely Remove Hardware applet before
disconnecting.
– Device manager is the Windows tool for managing
and troubleshooting device problems.
74
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Chapter 7 Summary
• LO 7.4 Troubleshooting Windows Problems
– Windows offers a variety of startup options,
and some are well suited for troubleshooting.
These include the Advanced Boot Options
menu and the System Configuration utility.
Both allow you to select from several options
for restarting Windows.
75
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Chapter 7 Summary
• LO 7.4 Troubleshooting Windows Problems
– Device Manager is the primary tool for
troubleshooting device problems. A yellow
exclamation mark on a device in Device
manager indicates a problem. Open the
properties dialog box to see an explanation.
76
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.
Chapter 7 Summary
• LO 7.4 Troubleshooting Windows Problems
– Use Device Manager to uninstall, update,
and remove device drivers. You can also
use it to disable a device without removing
the driver.
77
© 2012 The McGraw-Hill Companies, Inc. All rights reserved.