Windows Registry Troubleshooting
Windows Registry Troubleshooting
ov ea s
ns w ck
ai y T a
nt str d H
Co egi an
R ats
60 h e
C
www.itbookshub.com
For your convenience Apress has placed some of the front
matter material after the index. Please use the Bookmarks
and Contents at a Glance links to access them.
www.itbookshub.com
Contents at a Glance
www.itbookshub.com
Introduction
Whatever you do on your Windows PC, from installing software and apps, to using GPS
hardware, creating 3D models, or intricate embedded security systems and games, the
Registry is at the heart of what you do.
Consequently, it’s the one common element that’s guaranteed to run through all
troubleshooting problems. his makes a good knowledge of what the Registry is,
how it works, and how you can work with it, an essential skill for any support technician
or IT pro.
hat’s where this book comes in. here have been other Windows troubleshooting
books, but none have gone into as much detail about the Registry as you’ll ind here.
It’s not all dry technical code and complex structures, though. here are also a lot
of fun and cool things you can do with the Registry to enhance your productivity and
enjoyment of using your PC. In this book we’ve included over 60 of our favorite hints, tips,
and tweaks for Windows Vista, Windows 7, and Windows 8.1.
With a good knowledge of the Registry—and there’s no better way to learn than to
dive in with some hacks—you’ll be in a much better position to quickly diagnose and
repair Windows and PC problems as you encounter them.
xvii
www.itbookshub.com
CHAPTER 1
The most relevant simile for the Windows Registry in your PC is the human brain It stores
all of the key information and code that allows the different parts of your computer, and
its operating system and software, to communicate with one another. This includes
details about hardware addresses and communications protocols, software installation
and configuration files and, of course, the inner workings of Windows itself.
No matter what version of Windows you are using, you will have not one but many
registry files, as Windows splits the registry into several main files, which contain all the
information relevant to the overall operation of the computer and its hardware, and other
files specific to each individual user and their software, settings, and preferences.
Registry files are databases, often large and complex, that the operating system loads
into the PC’s memory as the computer starts or the user signs in. Without this readily
available store of settings, files, and options, nothing can start or operate on the PC at all.
The Registry is similar to the brain in another way, too. It’s able to heal itself, but only
to a limited extent. While the human body is full of all the building blocks required to
repair and rebuild damaged cells and tissue, the brain, like the spinal cord, mostly lacks
this self-repair ability. Should the wrong part of the brain is damaged, it simply would
be unable to repair itself In the case of the Registry, should the parts of the databases
containing the information required to load the Registry Editor, any third-party repair
tools, or the System Recovery Options become corrupt, self-repair will be out of the
question.
Fortunately, however, the Registry is unlike the human brain in one significant
way: you can rebuild and repair it from the outside, and even reset it to an earlier state
or wipe it completely and start from scratch. While the prospect of a surgeon or doctor
performing such an operation on your own mind might seem disturbing at the least, this
book will guide you through the Windows Registry in depth, and show you how to protect
configure, and repair your PC’s brain under any circumstances.
www.itbookshub.com
CHAPTER 1 ■ THE ARCHITECTURE OF THE WINDOWS REGISTRY
www.itbookshub.com
CHAPTER 1 ■ THE ARCHITECTURE OF THE WINDOWS REGISTRY
• SYSTEM
• DEFAULT
• USERDIFF (used only for OS upgrades)
Additionally, each user will have their own Registry files:
• %userprofile%\ntuser.dat
• %userprofile%\AppData\Local\Microsoft\Windows\UsrClass.dat
The first of these files, ntuser.dat, contains the user’s general software,
customization, and configuration options. The second, UsrClass.dat, contains
additional settings such as user-specific file associations and COM (Component Object
Model) information.
■ Note If you are still using Windows XP or Windows Server 2003, please stop! However,
the UsrClass.dat file can be found in the %USERPROFILE%\Local Settings\
Application Data\Microsoft\Windows\ folder.
www.itbookshub.com
CHAPTER 1 ■ THE ARCHITECTURE OF THE WINDOWS REGISTRY
The Registry files themselves are binary format files, and as such are not readable
without interpreter software. This is different from .reg files, which are exportable from
the Windows Registry Editor and are plain text, so as to be viewable and editable by
administrators.
■ Note Registry keys are containers that will contain values for software, hardware or the
Windows OS itself. Keys can be thought of as folders, in which the values are individual files.
You can navigate the keys using a folder-type hierarchy. Values are the nuts and bolts of the
Registry. These are the settings, integers, and strings that provide the data and information
that helps Windows load and effectively work with your hardware and apps.
HKEY_CLASSES_ROOT (HKCR)
This section stores information about registered applications, OLE Object Class IDs, and
file associations. Sometimes you may see it abbreviated to HKCR.
Should a subkey be added that duplicates a key that already exists in
HKEY_CURRENT_USER\Software\Classes, Windows will use the
HKEY_CURRENT_USER\Software\Classes key as its master.
HKEY_CURRENT_USER (HKCU)
This section contains the configuration options for the currently signed-in user’s profile,
including the disk locations for user folders, control panel settings, and specific app
configuration settings.
HKEY_LOCAL_MACHINE (HKLM)
As you might expect, this key contains all the settings specific to the PC on which
Windows is installed. It contains the subkey files SAM, SECURITY, SYSTEM, and SOFTWARE
that I listed earlier. A fifth file, HARDWARE, is created afresh each time the PC starts, and
contains information about currently detected plug-and-play hardware.
This key also contains the files COMPONENTS and BCD, which can be found in the
%systemroot%\System 32\Config\ folder, and which contain information specific to the
PC’s boot configuration data.
www.itbookshub.com
CHAPTER 1 ■ THE ARCHITECTURE OF THE WINDOWS REGISTRY
A few of the subkeys in the HKEY_LOCAL_MACHINE section are worthy of note, because
this collection of Registry files is most commonly modified and edited by users.
SAM
The Security Accounts Manager keys section will commonly appear empty unless the
viewing user has all appropriate administrative permissions. It contains the security
information for all the domains the PC connects to, including the local domain, which is
also called SAM.
Each SAM database contains the username used to log in to the domain, along with a
UID (Unique Identifier) for the domain, a cryptographic hash of the user’s password, the
location of the user’s Registry Hive, on the server, and various other settings and flags that
may be required by the connection.
SECURITY
This subkey also appears empty for most users unless they have appropriate
administrative permissions. Upon connection to a domain, it is linked to the security
database in the Server Registry Hive, which will contain all security policies applicable to
the current user and their installed apps.
SYSTEM
This subkey contains information about Windows setup, settings, and details for currently
mounted devices, and for drives that contain a file system.
SOFTWARE
This subkey contains settings for the currently installed Windows installation and its
installed software and apps. The keys are organized by software vendor and include
subkeys for file extensions, MIME types, and Object Class and Interface IDs (such as
ActiveX controls).
HKEY_USERS (HKU)
The HKU key contains settings and options for the currently-loaded user profile. You
cannot access settings for any user account other than the currently signed-in user
through these keys.
HKEY_CURRENT_CONFIG (HKCC)
Last, the HKCC keys contain information gathered when the PC starts and Windows loads.
This information is relevant only to the current powered-session and is discarded when
the PC is switched off.
www.itbookshub.com
CHAPTER 1 ■ THE ARCHITECTURE OF THE WINDOWS REGISTRY
Within each of the Registry sections, the individual keys include many different types,
to allow the greatest flexibility for managing settings and options for the Windows OS
and your apps and hardware.
HKEY_PERFORMANCE_DATA
This section is invisible when using the Windows Registry Editor. It contains runtime and
performance data that is provided by the Windows kernel, drivers, apps, and services. It is
discarded when the PC is switched off and is rebuilt at the next boot.
www.itbookshub.com
CHAPTER 1 ■ THE ARCHITECTURE OF THE WINDOWS REGISTRY
■ Note There are some differences between 32-bit (x86) and 64-bit (x64) Windows
Registries. The 64-bit QWORDs are not supported by 32-bit versions of the Windows operating
system. Also, the Registry handles 32-bit and 64-bit keys in the same intelligent way that
the file system handles multiple versions of the same DLL files, but maintains a compatibility
folder that you can find in the HKEY_LOCAL_MACHINE\Software\WOW6432Node section of the
Registry.
.reg Files
Earlier in the chapter I made a reference to .reg files, which are different from the
Registry in several important ways. First, while they store Registry keys and values, they
are intended for backup and transport between different PCs and Windows installations
of those values and keys. Also, .reg files are stored in plain ASCII text, unlike the Registry
database files, which are stored in binary.
.reg files will be automatically opened (or at least they should be if the file
associations are set correctly on a PC) by the Windows Registry Editor when double-clicked.
You can also export the entire Registry, or individual Registry keys, to .reg files in the
Registry Editor itself; we will show you how to perform these actions in Chapter 2.
You can manually edit the contents of a .reg file in Windows Notepad, or any other
text file editor (see Figure 1-2). Right-clicking a .reg file in File Explorer (known as
Windows Explorer in Vista and Windows 7) will reveal an Edit option in the context menu
that appears.
7
CHAPTER 1 ■ THE ARCHITECTURE OF THE WINDOWS REGISTRY
8
CHAPTER 1 ■ THE ARCHITECTURE OF THE WINDOWS REGISTRY
At the end of the key sits a subkey called "MinWidth" that has an integer value of 54.
This key changes the behavior of the Never Combine, Hide Labels option for the Windows
Taskbar (not Vista) so that program icons appear separately when multiple instances of
that program are run, but without their text labels.
We will include many more hints, tips, hacks, and tweaks for the Windows Registry in
Chapter 6.
Summary
Overall, while the Windows Registry is a huge behemoth bloated with many thousands
of complex binary, hexadecimal, and ASCII values and codes, it’s fairly simple and
straightforward to work with. In the next chapter, we’ll look how you can do exactly that,
and what tools and utilities exist to help you.
9
CHAPTER 2
RegEdit
The most logical place to start is Windows’s built-in Registry Editor, RegEdit (see Figure 2-1).
You can find this by searching for Regedit.exe in the Start menu or at the Start screen;
it will require elevated administrator privileges to run.
11
CHAPTER 2 ■ REGISTRY TOOLS AND UTILITIES
The built-in Registry Editor is a fairly basic editing and viewing app for the Registry,
but then it doesn’t have to do much. For the majority of the time all you will need to
do with the Registry is back up and reimport Registry files, and view, create, modify,
and delete individual keys and values. To summarize, the Registry Editor allows you to
perform the following operations:
• Locate a subtree, key, subkey, or value
• Add a subkey or a value
• Change a value
• Delete a subkey or a value
• Rename a subkey or a value
12
CHAPTER 2 ■ REGISTRY TOOLS AND UTILITIES
File Menu
There is a standard menu at the top left of the Registry Editor window with File, Edit,
View, Favorites, and Help options. The File Menu (see Figure 2-2) contains the Import
and Export controls and you can use these to back up and restore individual keys, settings
for whole applications or devices, or the entire Registry.
Figure 2-2. Back up and restore the Registry in the File menu of the Registry Editor
■ Note Always make a backup copy of the Windows Registry before creating, editing,
or modifying any keys or values, in case an action you perform causes an app, a hardware
device, or Windows itself to become unstable or unresponsive. You can back up the Registry
in the File menu of the Registry Editor by selecting Export. You can also force Windows to
make a backup of the Registry by creating a System Restore point, as described in Chapter 3.
Backups of the Registry are saved with the registration file (.reg) extension, which
are plain text and can be opened with Notepad, as shown in Figure 2-3. This means that it
is always advisable to store your .reg backup files in a secure and encrypted location, as
any plain-text file in the workplace that might be susceptible to theft by an individual or
through the use of malware might reveal sensitive data, such as domain information, that
you would not wish revealed.
13
CHAPTER 2 ■ REGISTRY TOOLS AND UTILITIES
Typically a .reg file will contain Registry information exported from one Registry.
If this .reg file is then run on another system, the information contained in the .reg file
will be imported directly into the Registry.
■ Note For a user to work with the Registry Editor or import .reg files directly to the
Registry, they will require elevated administrator privileges.
Also in the File menu are options to load and unload a Hive. This is a file that
contains a portion of the Registry but that may be currently inactive, such as being
applicable for a different user on the machine or not being applicable to the current
Windows session (e.g., if you’ve booted from a Windows install disc and are editing the
Registry from that).
Load and Unload Hive will permit you to manage these additional Registry files for
viewing and editing. By default in Windows these options are grayed out and unavailable
until you select HKEY_LOCAL_MACHINE (HKLM) or HKEY_USERS (HKU). We will show you how
to edit Registry Hive files, including the files for other users, in Chapter 4.
14
CHAPTER 2 ■ REGISTRY TOOLS AND UTILITIES
The next menu option allows you to connect to a Network Registry. If you
have a computer with Remote Administration enabled that is running the Remote
Registry Service, you can use this function to access Registry files on that PC. Remote
administration will be covered in Chapter 4.
Edit Menu
The Edit menu in RegEdit (see Figure 2-4) provides the commands you need to create
new Registry keys and to edit and delete existing keys and values. All of this functionality
is also available by right-clicking in RegEdit as well.
Under the Edit menu you can also set access permissions for the Registry. This can
be useful if you need to manage the Registry files for other users on the PC, but find that
file access is blocked when you do so.
Clicking Permissions in the Edit menu will display a Windows security dialog
containing a list of users and administrators on the PC, along with straightforward Allow
and Deny check boxes, as shown in Figure 2-5. You can modify access permissions here
for the Registry files.
15
CHAPTER 2 ■ REGISTRY TOOLS AND UTILITIES
Registry keys can be created by choosing the appropriate option in the Edit menu,
or by right-clicking on any Registry key (to edit it) or in a blank space (to create one) as
shown in Figure 2-6.
16
CHAPTER 2 ■ REGISTRY TOOLS AND UTILITIES
The main tree view of the Registry in the left panel of RegEdit, as shown in Figure 2-7,
also allows you to manage, create, and delete whole key groups. Right-clicking on a
group presents the same options as right-clicking on an individual key, with the addition
of Export and Permissions options. The Export option can be useful for saving just the
keys required for a particular customization, option, app, or hardware device for use on
additional PCs.
17
www.itbookshub.com
CHAPTER 2 ■ REGISTRY TOOLS AND UTILITIES
■ Note By default, Reg.exe works to match the version of Windows that is installed, be
this 32 bit or 64 bit, To work specifically with other key types you can use REG.EXE with the
/reg:32 and /reg:64 switches.
18
CHAPTER 2 ■ REGISTRY TOOLS AND UTILITIES
Add is used to add keys or subkeys to the Registry and is used in the following format
(note that some of the variables and syntax will be uniform across REG.EXE commands
and as such will only be detailed once):
REG ADD <KeyName> [{/v ValueName | /ve}] [/t DataType] [/s Separator]
[/d Data] [/f]
Use Add to add keys or subkeys to the Registry, as shown in Table 2-1.
Use Compare to view the similarities and/or differences between two Registry keys,
as shown in Table 2-2, using the following format:
19
CHAPTER 2 ■ REGISTRY TOOLS AND UTILITIES
You can make a copy of a Registry key with Copy, as shown in Table 2-3, using
this format:
Use Delete to discard a Registry key, as shown in Table 2-4, using the following format:
/v Deletes a specific key; if not specified all entries and subkeys will be deleted
/ve Only deletes entries with a null value
/va Deletes all entries under the specified key but not subkeys
Use Export and Import to make and restore backup copies of Registry keys
(see Table 2-5):
20
CHAPTER 2 ■ REGISTRY TOOLS AND UTILITIES
Use Flags to check the virtualization status or to set virtualization for a Key (i.e., to
maintain application compatibility), as shown here and in Table 2-6:
Use Load to write previously saved subkeys into a different subkey in the Registry.
Use Query for operations such as troubleshooting Registry entries; it is intended for use
with temporary files (see Table 2-7).
/f <Data> Specified the data or pattern that should be queried; use double quotes ""
if string will contain spaces
/k Search in key names only
/d Search in data only
/c Makes the query case sensitive
/e Only return exact matches
/t <Type> Specifies what specific Registry type to search, REG_SZ, REG_MULTI_SZ,
REG_DWORD_BIN_ENDIAN, REG_DWORD, REG_BINARY,
REG_DWORD_LITTLE_ENDIAN, REG_LINK, REG_FULL_RESOURCE_DESCRIPTOR,
REG_EXPAND_SZ
/z Includes the numeric equivalent of the Registry type in the search results
21
CHAPTER 2 ■ REGISTRY TOOLS AND UTILITIES
Use Restore to write previously saved keys and subkeys back into the Registry:
Use Unload to remove a section of the Registry previously added using REG_LOAD:
RegIni is used to modify Registry files using a script contained in one or more text
files. The text file will contain REG.EXE commands (see Table 2-8):
22
CHAPTER 2 ■ REGISTRY TOOLS AND UTILITIES
PowerShell is a vast topic and anything more than a brief introduction is outside
of the scope of this book. Since most readers will be administrators working with the
Registry, we will assume that you will seek additional knowledge regarding PowerShell
if needed.
One of the first issues many beginners find when learning how to use PowerShell
is that a command (cmdlet) may not work as expected. A very common issue relates to
correctly setting the Set-ExecutionPolicy. To enable tests of your PowerShell scripts
within your virtual-lab test environment, you will need to open a new PowerShell
command console with administrative privileges and type the following within the
PowerShell command window:
Get-ExecutionPolicy
You should see that PowerShell is by default set to restricted—that is, to only allow
scripts that are digitally signed to run. You need to change that policy to unrestricted to
allow our scripts to work in our lab environment. Type the following:
Set-ExecutionPolicy Unrestricted
When the cmdlet runs, you will be given a warning. Type Y to accept the policy
setting. This command modifies a key within the Registry to allow scripts to run on your
PC without requiring that they be signed first. You will see later in this chapter the exact
setting within the Registry that this command changed.
PowerShell can modify settings in the Registry, File System, Certificate Store, and
other areas, which PowerShell classes as Drives. Within PowerShell, type:
Get-PSDrive
You will be presented with the current list of drives that PowerShell has the ability to
interact with.
Noice that PowerShell has access to two Hives within the Registry: HKEY_CURRENT_USER
and HKEY_LOCAL_MACHINE. Just like the file system, you can navigate within the Registry
structure through PowerShell. Try typing the following (don’t forget the colon!):
CD HKCU:
DIR
If you want to view the properties of a Registry key, you can type:
You should see the properties of the key and this should correlate with the setting
you configured earlier in this chapter.
23
CHAPTER 2 ■ REGISTRY TOOLS AND UTILITIES
If you wanted to set the value back to Remote Signed, you would type:
System administrators will also use Group Policy and Group Policy Preferences to
configure PCs within an enterprise. There are several PowerShell commands that can be
used when working with the Group Policy Preferences that set Registry values as shown
in Table 2-9.
Verb CMDLETS
Get Get-GPPrefRegistryValue
Get-GPRegistryValue
Set Set-GPPrefRegistryValue
Set-GPRegistryValue
■ Note You cannot use PowerShell to manage Registry settings that affect the security
settings or software installation settings on a PC.
ScanReg
If you are using a “legacy” or older PC, rather than a modern operating system, you
may still need to manage or repair your Registry. The Windows Registry Checker Tool
(Scanreg.exe) was included with Windows 98, ME, and NT. Microsoft provided this tool
for users to be able to fix issues, optimize the Registry, and back up or restore the database.
To access the ScanReg tool, restart the PC in a special startup mode called “Safe
Mode Command Prompt Only.” In Windows 98 a daily backup of the Registry would be
created. Restore the most recent Registry as follows:
• Type cd\windows\command at the prompt, then press Enter.
• Type Scanreg.exe/restore.
• Select the required backup of the Registry from the list,
then press Enter.
The PC will restore and then you can restart the PC.
A GUI version of the tool ScanRegw is also available, which can be invoked by
selecting Run from the Start menu and typing scanregw. The result is shown in Figure 2-8.
24
CHAPTER 2 ■ REGISTRY TOOLS AND UTILITIES
■ Note ScanReg has been deprecated and is no longer included in modern versions
of Windows.
Process Monitor
Process Monitor (ProcMon) is one of the most comprehensive and powerful tools that
you should consider using when working with the Registry. Sure, the built-in RegEdit tool
can provide you with basic editing and functionality for occasional use, but the abilities of
the Process Monitor soon make the default tool very amateurish.
Process Monitor is not included in Windows but is a free tool from Microsoft that has
been created by the Sysinternals team and is fully supported by Microsoft. You can either
download and install it, or run it directly from the Sysinternals website, at
http://technet.microsoft.com/sysinternals.
Process Monitor allows you to monitor, record, and save Windows activity in real
time (i.e., dynamically). It looks at all file system, Registry, and process/thread activity
with the ability to log, analyze, and filter the results (see Figure 2-9). We are primarily
interested in its ability to focus on Registry activity. Many forensic and digital investigators
consider the tool the de facto advanced monitoring tool for Windows systems due to its
advanced features, including live filtering and the ability to save session details in Process
Monitor Format (PML), which further allows the data to be loaded into Process Monitor
for subsequent analysis.
25
CHAPTER 2 ■ REGISTRY TOOLS AND UTILITIES
■ Note The two legacy Sysinternals utilities, FileMon (File Monitor) and RegMon (Registry
Monitor), have been combined into the current Process Monitor tool.
You can see in Figure 2-9 that without filters applied, Process Monitor can capture
a staggering amount of data—over one million events were recorded within just 10
minutes. It is very important to understand how to apply filters to drill down and focus on
the data that you need.
One of the most useful features of the tool is the ability to apply and subsequently
save filters for later use. The underlying data is still available regardless of the filters
applied—if you remove the filters, then all of the data will be restored.
Simple filtering can be applied by using the event-class filter toggle buttons, which
are shown in Figure 2-10 on the toolbar above the activity screen.
26
CHAPTER 2 ■ REGISTRY TOOLS AND UTILITIES
As shown in the column selection dialog (Figure 2-11), Process Monitor can display a
vast array of data, such as the time, date, type, path, username, and whether the process is
running in UAC virtualization mode.
While the built-in filtering may appeal initially, most users will need more advanced
filtering. Process Monitor can filter the results on each of the columns and combine
results using the Boolean operators OR and AND. To build your own filter, type Ctrl+L or
select Filter from the menu bar and then select Filter.... With the Process Monitor Filter
dialog box open, use the drop-down menus to select which column heading to filter and
whether the item is included or excluded. Wild cards are also allowed within the filtering;
for instance, “Operation begins with Reg” will filter activities that affect the Registry, as
shown in Figure 2-12.
27
www.itbookshub.com
CHAPTER 2 ■ REGISTRY TOOLS AND UTILITIES
If you create a set of filters that you would like to reuse, you can save the
configuration by using the Save Filter option within the Filter menu.
■ Note Process Monitor will collect data continuously after you open the tool. Each
subsequent filter applied will filter through an increasing amount of data. Consider clearing
the output by stopping the capture, applying the filter, and then restarting the capture.
Earlier in this chapter you used PowerShell to change the ExecutionPolicy on your
computer. To illustrate the power of Process Monitor, we created a filter to capture only
the Registry activity by the PowerShell.exe process before the Set-ExecutionPolicy
command was run. You can see the results in Figure 2-13. The entry that set the Registry
value is highlighted.
28
CHAPTER 2 ■ REGISTRY TOOLS AND UTILITIES
Figure 2-13. Using Process Monitor to identify changes made to the Registry
You can right-click the entry in Process Monitor and select Jump to from the context
menu to open the Registry and view the newly modified entry. If you just want to see
the details of the modification you made, select Properties from the context menu of
the item as shown in Figure 2-14, which clearly shows the successful change of status to
Unrestricted.
29
CHAPTER 2 ■ REGISTRY TOOLS AND UTILITIES
Figure 2-14. Using Process Monitor to view the properties of a Registry entry
Registry Cleaners
There is some debate about the relative merits or drawbacks of third-party Registry
cleaners and utilities and whether, especially on a fast, modern PC, they provide any
useful functionality at all. For those people who do like to clean their Registry, however,
the most popular tool is the free CCleaner (Figure 2-15), which can be downloaded from
www.piriform.com/ccleaner.
30
CHAPTER 2 ■ REGISTRY TOOLS AND UTILITIES
CCleaner is a trusted utility that will automatically prompt you to make a backup
copy of your Registry before performing changes to it. It will then search for orphaned
(i.e., unused and unlinked) Registry keys and remove them. Using a Registry cleaner can
reduce the overall size, and therefore load time, of the Registry databases, and prevent
data corruption. Table 2-10 lists a number of popular third-party Registry cleaners.
31
CHAPTER 2 ■ REGISTRY TOOLS AND UTILITIES
Summary
While RegEdit is the most well known and perhaps widely used utility for editing and
working with the Windows Registry, it’s by no means the only one available nor the most
flexible—that prize clearly goes to PowerShell.
However you want to work and whatever you’re most comfortable with, there’s a tool
or utility to help you get the job done. Armed with that arsenal, troubleshooting problems
in the Registry becomes a simpler task, and it’s this troubleshooting that we’ll look at in
the next chapter.
32
CHAPTER 3
Troubleshooting a Corrupted
Registry
From our short exploration of Process Monitor, you can appreciate that for every piece
of software that is installed or run on and even removed from a PC, the system will write,
query, or delete entries in the Windows Registry. It is therefore vital that you maintain the
Registry carefully and ensure that it is kept in good working order.
It is not only that Windows depends on the Registry; applications also store settings and
query Registry keys on a regular basis to guide their operational behavior. When corruption
occurs, both system and application failures can often be traced to a rogue or incorrect
Registry item that can result in error messages and sometimes cause a system to crash.
The main causes of Registry corruption on PCs are...
• Windows Registry corruption
• Software installation or application failure
• Hardware or device driver failure
34
CHAPTER 3 ■ TROUBLESHOOTING A CORRUPTED REGISTRY
■ Note Just as with software installation, it is best practice to reboot the PC after each
installation of hardware. This effectively creates a point that is either stable or unstable.
Some issues may not present themselves to the user until after a reboot. Both are valuable
checkpoints if troubleshooting needs to take place subsequent to the installation.
35
CHAPTER 3 ■ TROUBLESHOOTING A CORRUPTED REGISTRY
Figure 3-1. Running System File Checker from the command prompt
36
CHAPTER 3 ■ TROUBLESHOOTING A CORRUPTED REGISTRY
SFC is included with all versions of Windows, but if you are attempting to run SFC
on a Windows system that has been updated with one or more service packs, you will
need to provide a DVD (or mounted ISO) of the Windows installation files that include
the applied service patch. This is because SFC will check and use the SP versions of the
system files to replace corrupted files.
■ Note SFC will take a long time to complete (the screen capture in Figure 3-1 took
one hour). SFC will check each system file for integrity and will repair any damaged system
file that it finds.
SFC is not intended to be a regularly used troubleshooting tool; consider using it only
when you encounter issues that relate to an unstable system.
ChkDsk
Another legacy tool, Check Disk (ChkDsk and ChkNTFS), will scan the computer’s hard
drives for errors and fix them. The tool requires administrative credentials to run since it
operates at a low hardware level and needs to have exclusive access to the disk if fixing issues.
To run ChkDsk, open an administrative command prompt, type the following, and
press Enter, as shown in Figure 3-2.
ChkDsk C: /F
37
www.itbookshub.com
CHAPTER 3 ■ TROUBLESHOOTING A CORRUPTED REGISTRY
Running the ChkDsk tool on the System drive will result in the task being scheduled
to run at the next system restart.
Any hard drive that is starting to fail to read or write data to the disk correctly is very
likely to lead to file corruption on the system. Normally if the PC encounters a corrupted
data file, this will result in some data loss and ultimately require the user to recover their
files from a backup or File History. You should be specifically interested in corrupted
Registry files as these can cause the system to hang or, more likely, crash.
Whenever Windows attempts and fails to read data from a corrupted system file,
page file, or the Registry, Windows will display a Stop error, commonly known as a blue
screen of death. If this happens, you should immediately troubleshoot your system
to establish whether this is an isolated incident or whether the blue screen is an early
38
CHAPTER 3 ■ TROUBLESHOOTING A CORRUPTED REGISTRY
indication of likely drive failure resulting in widespread file corruption and Windows
instability. Drive failure may sound catastrophic, and it is, but normally some time prior
to this a drive will exhibit the aforementioned failures, which are typical symptoms of
bad sectors—areas of a disk that have become unusable. Most bad sectors are caused by
physical disturbances such as voltage surges, physical damage, or manufacturing defects.
Software tools such as ScanDisk and ChkDsk are available for users to try to recover
data. Typically once a bad sector is identified, the system marks it as bad so it will be
hidden from the operating system and never be used again for data.
Windows 8.1 updated the Chkdsk tool so that it will run automatically in the
background and actively monitor the health of NTFS volumes. Should a file system
corruption be detected, NTFS now self-heals most issues when Windows is running,
without requiring the tool to be run from an offline repair tool such as a recovery drive.
■ Note Under normal operational conditions you will not need to run Chkdsk if you use
Windows 8.1 as the OS now monitors the file system for corrupted or bad sectors and fixes
the problems as a background task.
CCleaner
Although we have already introduced the popular CCleaner tool from Piriform, it is worth
including it again here in relation to resolving common Registry corruption issues.
As discussed earlier, whenever software applications and hardware drivers are
installed or removed from a PC there will be inevitable issues with leftover or orphaned
fragments and incomplete or obsolete entries.
A Registry cleaner will carry out some or all of the following activities:
• Scan your Registry for unwanted/malicious entries
• Remove unwanted/malicious entries to mitigate against
Registry bloat
• Remove outdated or superseded files
• Create backups of the Registry
• Remove incorrect file and program associations
• Restore the Registry if any maintenance task fails
• Defragment the Registry to remove any vacant spaces
(empty placeholders left behind in the Registry)
• Repair or remove system files such as orphaned or shared DLL files,
and locate device drivers no longer required and old ActiveX files
• Schedule scans to ensure that the Registry is scanned and errors
are repaired automatically
39
CHAPTER 3 ■ TROUBLESHOOTING A CORRUPTED REGISTRY
Many third-party Registry cleaners will remove excess bloat and keys that are
no longer relevant to the current system by deleting the unwanted keys and then
defragmenting the Registry files.
System Restore
Turned on by default, System Restore has been a key recovery component of Windows
for many years and can be extremely useful to recover a system that has encountered a
variety of problems. One of the key aspects that we like is that the tool can be used by
users of any ability, and can be initiated from either the Graphical User Interface (GUI)
or, if the GUI is not stable or accessible, then from the Advanced Startup options within
Windows 8.
System Restore is designed to apply a previously working snapshot (or system state)
to your PC from an earlier date (such as yesterday or this morning), before it became
corrupted, infected, or otherwise problematic—such as an infection with malware or
a faulty driver. System Restore can be accessed via System Properties; select System
Protection as shown in Figure 3-3.
40
CHAPTER 3 ■ TROUBLESHOOTING A CORRUPTED REGISTRY
■ Note Performing a System Restore does not delete any of your personal files or
settings, but you will lose any apps or installed programs that you have added to your
system after the date of the chosen System Restore point. The installation files may still be
on your PC, but their Registry entries will have been removed.
41
CHAPTER 3 ■ TROUBLESHOOTING A CORRUPTED REGISTRY
To restore a PC that has become unresponsive or keeps crashing, use one of the
following options.
42
CHAPTER 3 ■ TROUBLESHOOTING A CORRUPTED REGISTRY
■ Note System Restore has always received mixed reviews from IT professionals; some
like the tool, while others have little faith in its abilities. Our experience is that the tool is very
credible and works well, especially on well-maintained systems. It remains a valuable tool in
our troubleshooting toolkit and, being wizard driven, is generally not prone to user error.
43
CHAPTER 3 ■ TROUBLESHOOTING A CORRUPTED REGISTRY
If you are using Windows 8 or later, you can also invoke the Advanced Startup tools
from within the GUI. If your PC will not boot into Windows due to startup failure, then
the OS should automatically restart in the Recovery Environment and offer you options to
help troubleshoot your PC.
If your PC does not offer you the recovery environment, insert your Windows 8 or later
DVD or Recovery Disc and follow the “Press any key to boot to the DVD” prompt. Click
Next, and then click Repair your computer. On the Choose an Option page, as shown in
Figure 3-7, select Troubleshoot. (External link: Windows Recovery Environment (Windows
RE) Overview, http://technet.microsoft.com/en-us/library/hh825173.aspx.)
On the Troubleshoot page, select Advanced options, then select System Restore as
shown in Figure 3-8.
44
CHAPTER 3 ■ TROUBLESHOOTING A CORRUPTED REGISTRY
On the System Restore screen, choose the operating system that you want to restore
and then click Next. The System Restore wizard will now run, and you will be able to
follow the wizard as it prompts you to select the appropriate restore point and then restart
the PC.
45
CHAPTER 3 ■ TROUBLESHOOTING A CORRUPTED REGISTRY
To allow a user to see the Advanced Boot Options, you will need to run the following
command:
You can then reboot the system and enter the Recovery Environment as shown
previously, or wait for the command-line option, which allows you to press F8 and boot
into the Startup Settings without requiring you to use the Windows DVD, and offers the
tools shown in Figure 3-9. Notice that you can use either the number keys or function
keys F1 to F9 to select an option.
■ Note By default the system will allow 30 seconds to decide if users wish to enter the
boot recovery options during startup. This setting can be set to a lower number (such as 10)
by changing the setting within the Startup and Recovery setting dialog box found in System
Properties.
46
CHAPTER 3 ■ TROUBLESHOOTING A CORRUPTED REGISTRY
Figure 3-10. Windows 7: Selecting the Last Known Good Configuration option
A successful boot relates to the success criteria of each of the following actions:
• Startup of auto-start services
• Load of device drivers
• User account sign in
Last Known Good Configuration should only use this feature if the problem relates to
the current signed-in session and the user reported no incidents in the previous login.
47
www.itbookshub.com
CHAPTER 3 ■ TROUBLESHOOTING A CORRUPTED REGISTRY
■ Note Last Known Good Configuration has been deprecated in Windows 8 and later in
favor of the new Recovery Environment.
48
CHAPTER 3 ■ TROUBLESHOOTING A CORRUPTED REGISTRY
Figure 3-11. Roll Back Driver feature and confirmation screen in Device Manager
If the system is very unstable and will not allow normal booting into Windows, you
can boot using Safe Mode, which is a version of Windows that loads a minimal set of
essential drivers. Once in Safe Mode you should be able to either roll back the driver, or
delete it and reinstall a working driver and then reboot.
49
CHAPTER 3 ■ TROUBLESHOOTING A CORRUPTED REGISTRY
To boot into Safe Mode, use the same process as indicated before to boot to the same
menu that we saw for the Last Known Good Configuration (in Windows 7), then select
to boot the PC in Safe Mode. If you are using Windows 8, boot to the Advanced Startup
Settings shown in Figure 3-8 and select Enable Safe Mode.
Many of these driver issues have been mitigated over recent years for a number of
reasons, including a stable and consistent kernel model introduced with Windows Vista,
and also the increased shift toward 64-bit computing, which requires all drivers to be
digitally signed.
Summary
However you need to troubleshoot problems with the Registry, there are tools and
utilities that help you do it. Even if you’re unable to boot to the Windows desktop, you can
still use utilities built into the OS to repair problems.
The methods we’ve detailed so far, though, are primarily aimed at troubleshooting
and repairing problems for a single-user PC. If more than one user is set up on the
system, things can get slightly more complicated, and this is what we’ll deal with in the
next chapter.
50
CHAPTER 4
Working on the Windows Registry shouldn’t ever be an overly difficult or arduous task,
especially if it’s your own Registry, you need to make changes or troubleshoot a problem
for the currently signed-in user, or you need to fix a hardware or general Windows issue.
Sometimes, however, you might find that more than one person uses the same PC and
you need to make changes to all of their accounts. You can’t rely on those other people
being around and coming to sign in to the PC when you need them to so you can expedite
your repair work.
It is possible, though, to work on the Registry files of more than one user account
on a PC from within a single administrator-level account, which can save valuable time,
frustration, and the need to save text and configuration files containing all the necessary
changes, let alone transport those files from one account to another.
51
CHAPTER 4 ■ WORKING WITH OTHER USERS’ REGISTRY FILES/ADVANCED TROUBLESHOOTING
RegEdit.exe
RegEdit was introduced in Chapter 2, so we will dive straight into how to use this built-in
Windows tool to connect to another Registry on a different PC.
If you are testing this scenario locally, you can export a copy of your own Registry,
which you can then import to work with. Open Command Prompt (Admin) either by
searching for it in the Start Menu or at the Start Screen, or by pressing Windows+X in
Windows 8 or 8.1, and then type the following:
C:\mkdir c:\Temp
Regedit.exe /e c:\temp\yourname.reg
To load another Registry Hive into the current Hive, follow the steps below:
1. Log on to your computer as an administrator.
2. Type RegEdit at the Start Screen and press Enter.
3. Accept the User Account Control (UAC) warning.
4. Select the HKEY_LOCAL_MACHINE branch.
5. From the File menu, select Load Hive.
6. Locate the Registry file that you want to load and click OK.
7. Provide a friendly name for the loaded Registry file.
Once you have inspected or amended the Registry settings, you should unload the
Registry file by selecting Unload Hive from the File menu.
If you want to connect to the Registry owned by another user account, you can run
RegEdit.exe as before, but then open the NTuser.dat from the user profile that you
wish to access. The NTuser.dat (or NTuser.man for a mandatory user profile) files are
found within the Documents and Settings folder for Windows Vista or the Users folder in
Windows 7 or later. Essentially you will load another users’ Registry Hive file onto your
own PC and view them within the HKEY_USERS Hive, as shown in Figure 4-1.
1. Log on to your computer as an administrator.
2. Type RegEdit at the Start Screen and press Enter.
3. Accept the UAC warning.
4. Select the HKEY_USERS branch.
5. From the File menu, select Load Hive.
6. Browse to the profile directory and select NTuser.dat.
7. When prompted for Key Name, input their username as a
reference label.
8. RegEdit will then import the user’s Registry data.
9. Once you have reviewed or made your changes, highlight the
Hive and select the Unload Hive option from the File menu.
52
CHAPTER 4 ■ WORKING WITH OTHER USERS’ REGISTRY FILES/ADVANCED TROUBLESHOOTING
To load the same Hive directly into RegEdit, type the following command, with
the username of the account you want to load the Hive for, into an elevated Command
Prompt or administrative PowerShell console:
■ Note You are only able to use RegEdit to access the HKEY_USERS and
HKEY_LOCAL_MACHINE Hives from another user.
The system hides NTuser files by default, so you may need to amend your Folder
Options settings within File Explorer to enable the viewing of hidden system files.
If you do not have third-party tools available and you want to compare two registries
side by side, you can use the following command in an administrative PowerShell console
to open an additional, separate instance of RegEdit:
Regedit.exe –m
If you do not have an existing instance of RegEdit running, you will receive an error.
Once you have two instances of RegEdit running, if you are using Windows 7 or
later you can use the Windows Snap feature to compare the results side by side, as
shown in Figure 4-2.
53
CHAPTER 4 ■ WORKING WITH OTHER USERS’ REGISTRY FILES/ADVANCED TROUBLESHOOTING
If you are not familiar with the Snap feature, you can use the keyboard shortcuts:
Windows+left arrow to snap the window against the left side or Windows+right arrow to
snap it against the right.
■ Note The Regedit.exe –m command will work with Windows XP and later OSs, and
requires at least one instance of RegEdit already to be running.
Remote Administration
To activate Remote Administration on a PC there are several steps to go through. The first
is to open the Group Policy Editor (search for gpedit.msc in the Start Menu search box or
at the Start Screen) and navigate to Computer Configuration ➤ Administrative Templates
➤ Network ➤ Network Connections ➤ Firewall, and then either Domain Profile or
Standard Profile depending on how you will connect to and manage the PC.
You will want to enable the Windows Firewall: Allow inbound remote administration
exception. When you do this you will be informed (see Figure 4-3) that this will permit
tools such as the Microsoft Management Console (MMC) and Windows Management
Instrumentation (WMI) to remote-administer the PC.
54
CHAPTER 4 ■ WORKING WITH OTHER USERS’ REGISTRY FILES/ADVANCED TROUBLESHOOTING
55
CHAPTER 4 ■ WORKING WITH OTHER USERS’ REGISTRY FILES/ADVANCED TROUBLESHOOTING
You will also be told to open TCP ports 135 and 445 in the firewall. To open the
firewall, either search for Firewall in the Start Menu or at the Start Screen and, when it
opens, click the Advanced Settings link in the left panel, or open the Administrative Tools
from the Control Panel and you will see Windows Firewall with Advanced Security listed.
In the Advanced Firewall, click the Inbound Rules link in the left panel, then the New
Rule… link in the right panel. You can now create a new inbound rule to permit access to
ports 135 and 445 (see Figure 4-4).
■ Note You can enable or disable the Remote Administration exception in Group Policy
from the Command line by using the command netsh firewall set service
type = remoteadmin mode = [mode] where [mode] is either enable or disable.
The last step is to activate the Remote Registry service on the PC you want to
remotely administer. The Remote Registry Service can be found in the Windows Services
panel, or you can search for services.msc in the Start Menu search box or at the Start
Screen (see Figure 4-5).
56
CHAPTER 4 ■ WORKING WITH OTHER USERS’ REGISTRY FILES/ADVANCED TROUBLESHOOTING
To activate the service, right-click and select Properties from the context menu that
appears. The service is disabled by default but a dialog will appear where you can enable
and start the service.
■ Note To enable and start the Remote Registry service from the Command Prompt,
type sc start RemoteRegistry. You can set it to automatically start each time the
computer boots using the command sc config RemoteRegistry start = auto.
57
www.itbookshub.com
CHAPTER 4 ■ WORKING WITH OTHER USERS’ REGISTRY FILES/ADVANCED TROUBLESHOOTING
With the Remote Registry Service running on both the local and remote PCs, you can
then attempt to connect across the network from within RegEdit:
1. Log on to your computer as an administrator.
2. Type RegEdit at the Start Screen and press Enter.
3. Accept the UAC warning.
4. Click File and select Connect Network Registry
5. Enter the name of the PC you wish to connect to. You can also
click the Advanced button and then click Find Now to list all
available PCs on the network that you can connect to.
6. Click OK.
7. You will now see the PC listed and two new branches appear
within RegEdit: one for HKLU and one for HKU.
8. Once you have reviewed or made your changes, highlight the
Computer icon and select the Disconnect Network Registry
option from the File menu.
If you prefer to use the command line rather than the GUI tools, you can use the
following commands to enable and start the Remote Registry Service, respectively:
58
CHAPTER 4 ■ WORKING WITH OTHER USERS’ REGISTRY FILES/ADVANCED TROUBLESHOOTING
Windows PowerShell
PowerShell does not natively allow the manipulation of the Registry on a remote PC.
This could be achieved through some coding to create a script with the .NET Framework
(using the Microsoft.Win32.Registry and Microsoft.Win32.RegistryKey classes),
but this is outside of the scope of this book.
In Chapter 2 we explored how PowerShell could be used to configure Registry
settings with Group Policy Preferences, which can be directed at remote PCs and users
in an organization.
59
CHAPTER 4 ■ WORKING WITH OTHER USERS’ REGISTRY FILES/ADVANCED TROUBLESHOOTING
Figure 4-7. Creating new Registry keys with Group Policy Preferences
There are three Registry key options available to choose from, as shown in Table 4-1.
Table 4-1. Options for Creating New Registry Keys with Group Policy Preferences
60
CHAPTER 4 ■ WORKING WITH OTHER USERS’ REGISTRY FILES/ADVANCED TROUBLESHOOTING
Figure 4-8. Setting the Action condition within Group Policy Preferences
There are four Action options available to choose from, as shown in Table 4-2.
61
CHAPTER 4 ■ WORKING WITH OTHER USERS’ REGISTRY FILES/ADVANCED TROUBLESHOOTING
■ Note When you run Group Policy on your local machine, you are using Local Group Policy,
which does not contain Group Policy Preferences. GPPs can be managed from systems with
the GPP Client Side Extensions. These extensions need to be separately downloaded for
Windows XP and Windows Server 2003, but are available as a built-in feature that you can
enable on client PCs running Windows Vista with Service Pack 1 (or later) with the RSAT or
Windows Server 2008 (or later).
Comparing Registries
We have already mentioned that nearly everything that is installed or configured on a
Windows PC is stored within the Registry. During a typical software installation you will
be surprised by the scale of how much Registry activity occurs. Often tens of thousands of
Registry keys are added or edited during even a relatively small software installation. If we
were able to compare the Registry of a PC before and after one of these events, we would
be able to see the changes made within the Registry.
We can use special utilities to effectively take snapshots of the Registry, before
and after these events, so that we can make a comparison between two exported files.
Another forensic technique is to compare registries from one machine and a different or
reference PC to identify the changes that are in effect between the two PCs. Some Registry
comparison tools are listed in Table 4-3.
62
CHAPTER 4 ■ WORKING WITH OTHER USERS’ REGISTRY FILES/ADVANCED TROUBLESHOOTING
Advanced Troubleshooting
All of the repair methods for the Windows Registry that we’ve detailed so far rely on the
OS being in a state in which it will either boot, or the startup options will work. What
should you do, though, if the Registry is so corrupt that neither of these is an option? Do
you need to reinstall the OS from an image backup or can the Registry still be repaired?
The former option is often seen as the quick and simple way for a systems
administrator to fix a problem, but it’s rarely as quick and simple as might first appear.
Yes, you can restore a Windows system image in less than the 30 minutes—normally
deemed “the holy grail” of repair times, especially in a enterprise environment—but most
PCs will very likely then have a huge number of Windows, software, and other updates to
install, not to mention any configuration or user changes that were made after the backup
image was created.
All of these things can add an extra couple of hours to the repair time for a PC, during
which the machine itself, and the person relying on it, is unproductive. Tools do exist to
help you repair the Registry in case of a full-on crisis, however, and some careful planning
and preparation can help get even an unbootable Windows installation working again.
63
CHAPTER 4 ■ WORKING WITH OTHER USERS’ REGISTRY FILES/ADVANCED TROUBLESHOOTING
Figure 4-9. Accessing the Recovery Options in Windows Vista and Windows 7
When the System Recovery Options appear, open the Command Prompt, and it’s
here that you can type RegEdit.exe to start RegEdit.
64
CHAPTER 4 ■ WORKING WITH OTHER USERS’ REGISTRY FILES/ADVANCED TROUBLESHOOTING
Figure 4-10. Accessing RegEdit from Windows 8 and 8.1 installation media
65
CHAPTER 4 ■ WORKING WITH OTHER USERS’ REGISTRY FILES/ADVANCED TROUBLESHOOTING
You will thus need to connect RegEdit to the appropriate file or files you want to work
on. This is done in the Administrative Command Prompt before you open RegEdit itself,
and was detailed at the beginning of this chapter.
You will connect to a user’s Registry files using the command reg.exe load HKLM\
TommyLee "c:\users\Tommy Lee\ntuser.dat", but you may want to change the
name and location of the .dat file to one of the core OS Registry files located in the
%systemroot%\System 32\Config\ folder of the hard disk, as detailed in Chapter 1.
Once connected to the appropriate Registry file, you can make changes in the same
way as if you were using RegEdit on a working PC, including importing a backup copy of
an old Registry file if this is required.
66
CHAPTER 4 ■ WORKING WITH OTHER USERS’ REGISTRY FILES/ADVANCED TROUBLESHOOTING
■ Note A quick note on the System Volume Information folder, which System Restore uses
to make periodic backup copies of system files, including the Registry: these files are stored
in a compressed and encrypted *.dat file container and cannot be accessed for reasons
of security and to prevent malware infection.
This brings us back to adding your PC’s Registry files to your regular backup. Armed
with these files you can start your PC from a portable OS such as GNU/Linux, Ubuntu
(as shown in Figure 4-12), or a USB-bootable copy of Windows and restore those Registry
files using the file explorer in the portable OS. This will allow you to display all files,
though bear in mind you will likely need to check the relevant option to show all hidden
files on the hard disk.
■ Note You cannot use a Windows To Go USB Flash Drive to access the file system on the
host computer, as it is blocked for security reasons.
67
www.itbookshub.com
CHAPTER 4 ■ WORKING WITH OTHER USERS’ REGISTRY FILES/ADVANCED TROUBLESHOOTING
68
CHAPTER 4 ■ WORKING WITH OTHER USERS’ REGISTRY FILES/ADVANCED TROUBLESHOOTING
You can now boot your PC from the flash drive, but note that you may need to
change the boot setting in the BIOS/UEFI for this, and use this portable OS to repair the
host PC. The initial setup process for the flash drive when you first start the PC from it can
take some time, and it’s a good idea to do this on the PC you intend to repair, as moving
the drive between different PCs—especially with different BIOS/UEFI types—can result in
the flash drive not working on some machines or Windows believing the hardware it has
been installed on has changed, and asking for a fresh product key.
■ Note If you intend to use this flash drive for a one-time repair, Windows 7 presents
a good option, as it offers a 30-day trial of the OS. You can download a trial of the
current Windows version from the TechNet Evaluation Center at
http://technet.microsoft.com/en-gb/evalcenter.
One last point to note is that you can repair any version of Windows by using any
other version of Windows as a portable OS. It is, for example, perfectly okay to repair
Windows 10 using a Windows 7 bootable Flash Drive. The two operating systems won’t be
in a dual-boot system, and so long as one can read the file system of the other all will work
well. This won’t work with drives that are encrypted with BitLocker Drive Encryption,
however, where you will need to resort to a System Image recovery.
69
CHAPTER 4 ■ WORKING WITH OTHER USERS’ REGISTRY FILES/ADVANCED TROUBLESHOOTING
We will walk through the steps to recover the preceding case study by using the
popular Hiren’s Boot CD.
1. Download the Hiren’s Boot CD ISO.
2. Create a bootable USB or CD from Hirensbootcd.iso.
3. Boot the PC with the Hiren disk, then select Mini Windows XP.
4. Allow Mini XP to load, then click the Hiren menu icon and
select Registry, then Registry Editor PE.
5. Set the remote Windows directory to C:\Windows and click OK.
6. To edit the Registry Hive HKEY_CURRENT_USER, you need to
load NTUSER.DAT from the User directory.
7. Expand HKEY_LOCAL_MACHINE and navigate to
_REMOTE_SOFTWARE\Microsoft\Windows NT\
CurrentVersion\Winlogon.
8. Edit the Userinit key and set the value to
"C:\Windows\System32\Userinit.exe" as shown in Figure 4-13.
9. When you close RegEdit the Hives will automatically unload
and you can then exit the Hiren’s toolkit and reboot the PC.
70
CHAPTER 4 ■ WORKING WITH OTHER USERS’ REGISTRY FILES/ADVANCED TROUBLESHOOTING
Summary
With PCs being designed to maximize the potential for multi-user environments, it might
seem perplexing that it’s often difficult to edit and troubleshoot the Registry files for
user accounts other than your own. As you have seen in this chapter, however, it can be
achieved without too much fuss.
The primary reason for Microsoft making it difficult, however, is to maintain a high
level of security for both the Registry and the PC, and it’s maximizing your Registry’s
security that we’ll talk about in the next chapter.
71
CHAPTER 5
As a parent, I was once told that if children are left to play, then they will happily play all
day without getting themselves into any trouble, but if a door or garden gate is forgetfully
left open, then children will wander, explore, begin to get into mischief. . . . There are
many doors in the Registry, but while some may be opened, thankfully Windows will
protect us from destroying the Registry. On a modern operating system, the Windows
security model is very robust and will do a very good job at protecting itself from
destruction, sometimes despite our own best endeavors to undermine security.
As you discovered earlier, a PC is only secure if Windows does not get
compromised. Windows can be attacked from many vectors, and we will highlight a few
in this chapter to help prevent unauthorized access to your system and ultimately the
Registry. We have identified several areas where an attacker can seek to gain access to
your system. These include:
• Physical security
• Anti-malware
• User protection
• Encryption
• Password security
73
CHAPTER 5 ■ SECURING THE REGISTRY
74
CHAPTER 5 ■ SECURING THE REGISTRY
75
CHAPTER 5 ■ SECURING THE REGISTRY
In case you are still unsure whether an unsigned driver is cause for concern, let us
delve a little deeper. Windows has been built to run in two main modes—a kernel mode
and a user mode. User mode runs applications and software on a top layer of Windows
and interacts continuously with the operating system, but never directly controls system
resources, RAM, CPU, or hard drives.
Kernel mode is a trusted area. Windows gives full access to the internal memory
spaces and does not regulate, check, or provide any protection to the system from
components that are trusted to run in kernel mode. Internal Windows processes,
including system code such as services and device drivers, run completely within kernel
mode. It is therefore vital that these components be carefully designed and tested,
because once they have access to run in kernel mode they completely bypass Windows
security to access objects on the system.
To list all drivers that have been registered on a PC, you can use the built-in
Msinfo32.exe utility in Windows.
1. Search for Msinfo32 on the Start screen in Windows 8.1 or in
the Start Menu in Windows 7.
2. Select the System Drivers entry under Software Environment.
3. Sort the drivers by the Started column; drivers that are loaded
are represented by a “Yes” in Figure 5-3.
76
CHAPTER 5 ■ SECURING THE REGISTRY
You can also view the list of loaded kernel-mode drivers with Process Explorer,
another tool in the Sysinternals suite.
The pop-up warning that a user receives when they attempt to load an unsigned
third-party driver is often ignored, yet this is potentially one of the most common points
of entry into a system that malware can adopt.
■ Note There is no way to turn off the “unsigned driver” pop-up warnings in Windows on
a permanent basis.
77
CHAPTER 5 ■ SECURING THE REGISTRY
78
CHAPTER 5 ■ SECURING THE REGISTRY
To confirm that your anti-malware signatures are current and that Windows
Defender is configured to operate in the background and perform real-time scanning,
perform the following steps:
1. Type defender into the Start Screen and press Enter.
2. Windows Defender will open.
3. Review the Real-time protection status (on/off ).
4. Review the status of the virus and spyware definitions.
5. If necessary click Update.
6. Close Windows Defender.
Because Microsoft is able to update malware signatures via Windows Update quickly
to millions of PCs around the globe, Windows PCs are protected against the constant
threat of malware.
Enterprise customers will often choose to configure PCs within their organization
to receive enterprise-level anti-malware software updates, which allows greater
management capabilities such as deployment, reporting, and isolation-based quarantine.
79
CHAPTER 5 ■ SECURING THE REGISTRY
The introduction of UAC has greatly reduced the infection rate from malware,
although malware has also continued to advance and keeps finding new and innovative
ways to infect our PCs.
Most security breaches, malware, and Registry corruption is related to tasks carried
out with administrator privileges—the most trusted status. Standard user accounts, on
the other hand, are limited in their ability to make system-wide changes, and are even
prevented from launching tools that could be used to make changes, such as allowing
applications to be installed.
Some references mention UAC as a user protection tool, since it is aimed at
protecting the system from the user, but unfortunately it is often ignored by the home and
enthusiast PC owner. As mentioned, this ignorance is primarily due to a lack of awareness
of what UAC actually does and how it helps with the defense-in-depth strategy that is
absolutely required in the modern age of computing. Put bluntly, UAC is a key weapon
against the constant and ever-changing threat from malware.
80
CHAPTER 5 ■ SECURING THE REGISTRY
Educating users as to how UAC protects our systems is often overlooked. Within
an enterprise, UAC will rarely present itself to typical users, since they are not routinely
configuring, installing software on, or modifying their systems. These tasks are often
the core roles for the IT support professionals to whom employees will turn, via the IT
helpdesk, should they require changes to be made to their devices. IT support has the
necessary administrative privileges, tools, and knowledge to respond to both the UAC
prompt and the user’s requested change.
We have mentioned that most PC users outside of the enterprise space are often
configured as the administrator of the PC. For home and enthusiast users of Windows,
the UAC has often been referred to as mildly annoying. Research has proven that over a
period of time, a constant prompt by the UAC will become counterproductive, with users
ignoring the warning presented and instead acknowledging the request to elevate, and
that they see the UAC as simply a hurdle to cross in order to implement the change that
the user initiated.
The main purpose of UAC, however, is not to annoy users. In Windows 8, thankfully,
there were some slight changes to the way in which UAC interacts with the user. This fine
tuning is certainly welcome, but it may be more appreciated by new users of Windows,
who have not been frustrated by UAC since its introduction in Windows Vista.
To modify the UAC settings as shown in Figure 5-8, type UAC into the Start screen and
press Enter or select Change User Account Control settings.
81
CHAPTER 5 ■ SECURING THE REGISTRY
82
CHAPTER 5 ■ SECURING THE REGISTRY
Table 5-1 shows the differences between the elevation prompts that each type of user
will receive each time they wish to perform a task that will have system-wide impact.
Typical scenarios where a standard user would be prompted by UAC for the
elevation to administrative privileges to complete the task include the following:
• Add or remove a user account
• Browse to another user’s directory
• Change user account types
• Change Windows Firewall settings
• Configure Automatic Updates
• Configure Parental Controls
• Install a driver for a device
• Install ActiveX controls
• Install and uninstall applications
• Modify UAC settings
83
CHAPTER 5 ■ SECURING THE REGISTRY
Encryption—BitLocker
One of the trends of modern computing is that the majority of devices have become
increasingly mobile. This is great for scenarios that benefit from mobility, but the
downside is the increased number of devices that get left on a train, stolen, or accidentally
dropped and damaged. During 2013 in the UK alone, over 880,000 devices were stolen or
lost.
Most devices that are lost or stolen are resold on the black market to unsuspecting
(or not) purchasers, and the device then has a second life. Some theft is much more
sinister and results in the device being stolen to order, with the aim of gaining corporate
network entry or access to data contained on the device.
The majority of laptop owners rely entirely on the username/password combination
that they type into the PC offering them protection against unauthorized access to their
corporate data or (for home users) personal information. This process utilizes the NTLM
protocol to securely authenticate and is an excellent, proven method of security.
Yet most users are unaware (and shocked to learn when told) that simply removing
the hard drive from a lost, stolen, or damaged laptop and connecting it to another
computer will allow anyone with administrative privileges on the local PC to read and
extract all the information contained on the hard drive without any special skills, tools, or
passwords, thus completely bypassing the built-in Windows security.
Third-party drive encryption software to help protect against this method of data
access has been available for many years. Microsoft provided BitLocker Drive Encryption,
a tool available since Windows Vista, which has allowed users and enterprises to
completely encrypt the hard drive on their PCs—thereby preventing unauthorized access
to their data, even if the drive is lost and subjected to the process just outlined. BitLocker
is an encryption-based technology that works “under the hood” of Windows to ensure
that the device is secure even before Windows takes over.
Still, despite BitLocker and similar tools being available, only a tiny proportion of
devices are actually encrypted by their owners. With the release of Windows 8.1 and
later, Microsoft has enabled BitLocker device encryption on all OEM-shipped devices
by default. Once the new owner of the device signs on to the device using their Microsoft
account, the BitLocker encryption is completed and the BitLocker recovery keys are
automatically stored within the user’s own OneDrive location (formerly known as SkyDrive),
which is available by signing on to the page at https://onedrive.live.com/recoverykey.
84
CHAPTER 5 ■ SECURING THE REGISTRY
Figure 5-10. Viewing the status of the Trusted Platform Module in the Control Panel
85
CHAPTER 5 ■ SECURING THE REGISTRY
Figure 5-11. Viewing the status of BitLocker Drive Encryption in the Control Panel
86
CHAPTER 5 ■ SECURING THE REGISTRY
■ Note Microsoft BitLocker Administration and Monitoring 2.5 is only available as part of
the Microsoft Desktop Optimization Pack (MDOP), which is a benefit to Microsoft Software
Assurance customers.
87
CHAPTER 5 ■ SECURING THE REGISTRY
Although outside the scope of this book, BitLocker can also be deployed to protect
removable drives such as SDHC cards, USB hard drives, and thumb drives using a feature
called BitLocker To Go. Enterprises have the ability to allow or deny users the ability to
save data onto external drives that are not BitLocker encrypted by using the extensive
GPOs that are available.
■ Note If you want to use BitLocker to protect a drive on a PC without a TPM, you must
enable the Require additional authentication at startup policy setting within Group Policy, and
then within that setting, click Allow BitLocker without a compatible TPM.
We hope that you can appreciate from this short introduction of BitLocker Drive
Encryption that this feature is a valuable defensive strategy that protects against data
theft. BitLocker encrypts entire volumes on a hard disk, making them unusable unless
the drive has been unlocked by BitLocker, and thereby minimizes the risk of data loss on
computers that are lost or stolen.
Password Security
Passwords have been at the heart of most computer system security for several decades,
and while the protocols have improved, the concept has remained the same: a user will
sign in to a PC using a username and password to gain access.
In this section we describe a free tool from Microsoft that will allow users and
administrators to establish what level of security their machine exhibits, and will also
highlight vulnerabilities and areas for concern. The tool scans the local PC (or even a
whole network of PCs) for a multitude of security-related issues and displays the results in
an easy-to-read and understand report.
The tool is called Microsoft Baseline Security Analyzer (MBSA) and can be
downloaded at www.microsoft.com/en-gb/download/details.aspx?id=7558. The
reason to include the tool in this section is because it will scan and report on the existence
of weak passwords, and of computer accounts that may not have any passwords set at all!
The tool has been available for download for over 10 years but rarely, during my onsite
consultancy visits, do I encounter many enterprises using the tool.
Download MBSA and follow the wizard to run the security analysis on your PC. An
example report is shown in Figure 5-12.
88
CHAPTER 5 ■ SECURING THE REGISTRY
89
CHAPTER 5 ■ SECURING THE REGISTRY
Because of the nature of the scan, MBSA requires administrative privileges on the
PCs that it is scanning.
■ Note You can also use MBSA to perform security scans on servers.
Figure 5-13. Using Local Security Policy Editor to modify the password policy
90
CHAPTER 5 ■ SECURING THE REGISTRY
These complexity requirements can help ensure users have strong passwords that
are significantly more difficult to crack, even by automated means. Where users need to
regularly change their passwords, it can be helpful to suggest that they use passphrases to
create long passwords that are easier to remember.
Summary
Maintaining effective and robust security on PCs is the best way to secure the Registry
from attack by malware, hackers, or users who would do it harm. Security these days is
multilayered, too, as we’ve detailed in this chapter.
Aside from all the seriousness, however, if you did want to hack your own Registry,
what would you do with it? Well, in the final chapter we’ll detail over 60 of our favorite
cheats, hacks, tweaks, and Registry modifications.
91
CHAPTER 6
No operating system has ever been as configurable as Microsoft Windows. From its very
earliest days you could change all manner of facets in its look, feel, and operation, and
many of these have been made possible by the Registry.
You’ll probably have your very own favorite Registry hacks and tweaks, which could
do anything from modifying the look of the Windows User Interface (UI); to changing the
operation of a feature, piece of software, or hardware device; or might even be a hack that
modifies the underlying operation of Windows itself.
This chapter, then, is a grand compendium of our favorite hacks, tweaks, and
changes, grouped with others that people have found useful or interesting over the years.
■ Note Not all of these hacks will be relevant to all Windows editions. Where this is
the case we will highlight this in the text by adding the version numbers at the start of
the description.
It’s worth noting that for all of these changes, you will either need to sign out and
back in again if the change has been made to HKCU, or restart the PC if the Registry is
change is made elsewhere. Also there are many tweaks here for File Explorer, which is
called “Windows Explorer” in Windows Vista and Windows 7.
One word of warning: Before you implement any of the Registry tweaks here, or
indeed any Registry tweak at all, make sure you export a backup copy of the Registry,
or even just the affected key(s), so that you can restore these if the change you make
causes a problem.
93
CHAPTER 6 ■ HACKS, TWEAKS, AND COMMON CHANGES
Figure 6-2. The modified Taskbar view for the same open apps
94
CHAPTER 6 ■ HACKS, TWEAKS, AND COMMON CHANGES
95
CHAPTER 6 ■ HACKS, TWEAKS, AND COMMON CHANGES
96
CHAPTER 6 ■ HACKS, TWEAKS, AND COMMON CHANGES
97
CHAPTER 6 ■ HACKS, TWEAKS, AND COMMON CHANGES
Figure 6-3. The Use the Web service to find the correct program dialog
98
CHAPTER 6 ■ HACKS, TWEAKS, AND COMMON CHANGES
[HKCR]\*\shell
[HKCR]\*\shellex\ContextMenuHandlers
[HKCR]\AllFileSystemObjects\ShellEx
99
CHAPTER 6 ■ HACKS, TWEAKS, AND COMMON CHANGES
Under these locations you will see subkeys for the third-party software that has
plugged itself into your context menus. There are several ways to handle them. You can
delete the keys to remove them completely. To force them to show only on a Shift+right
click, add a string value to each called "Extended", or to leave them in the Registry but
disable them, add a string value called "LegacyDisable".
100
CHAPTER 6 ■ HACKS, TWEAKS, AND COMMON CHANGES
App Tweaks
Sometimes specific apps will come with their own Registry tweaks. Two useful and
common ones are the options to remove the Context menu entries for AMD and Nvidia
display cards.
Administrative Tweaks
It’s common knowledge that tasks that can be accomplished in Group Policy, can also
be achieved through the use of Registry tweaks. This isn’t the limit of the administrative
tweaks that can be performed in Registry however, and here are our favorites.
101
CHAPTER 6 ■ HACKS, TWEAKS, AND COMMON CHANGES
This can sometimes change the default button, which often is set to Sleep. But you
can disable Windows’s ability to change this button by navigating to [HKCU] \Software\
Policies\Microsoft\Windows\WindowsUpdate\AU and adding a DWORD value called
"NoAUAsDefaultShutdownOption" with "1" as its data.
102
CHAPTER 6 ■ HACKS, TWEAKS, AND COMMON CHANGES
Now save this file as a .reg file; by default Notepad will want to save it as a .txt file,
so in the Save dialog choose All file types instead.
You can also remove the Registry Editor from the control panel by creating a .reg file
with the following contents.
103
CHAPTER 6 ■ HACKS, TWEAKS, AND COMMON CHANGES
[HKEY_CLASSES_ROOT\*\shell\runas]
@="Take Ownership"
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\*\shell\runas\command]
@="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant
administrators:F"
[HKEY_CLASSES_ROOT\Directory\shell\runas]
@="Take Ownership"
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\Directory\shell\runas\command]
@="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant
administrators:F /t"
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\"
/grant administrators:F /t"
104
CHAPTER 6 ■ HACKS, TWEAKS, AND COMMON CHANGES
105
CHAPTER 6 ■ HACKS, TWEAKS, AND COMMON CHANGES
106
CHAPTER 6 ■ HACKS, TWEAKS, AND COMMON CHANGES
Disable IPv6
(Vista, 7, 8) The world needs IPv6, with so many laptops, tablets, fridges, cars, and
microwaves now connected to the Internet. In some environments, however, such as
where legacy hardware or software encounters problems with IPv6 in Windows, you can
disable it at [HKLM]\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters\ by
creating a DWORD value called "DisabledComponents" that has "ffffff" as its value.
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Download]
"CheckExeSignatures"="no"
"RunInvalidSignatures"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\
Attachments]
"SaveZoneInformation"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\
Associations]
"LowRiskFileTypes"=".zip;.rar;.nfo;.txt;.exe;.bat;.com;.cmd;.reg;.msi;.htm;.
html;.gif;.bmp;.jpg;.avi;.mpg;.mpeg;.mov;.mp3;.m3u;.wav;"
107
CHAPTER 6 ■ HACKS, TWEAKS, AND COMMON CHANGES
Performance Tweaks
(Vista, 7, 8) Some tweaks are designed to boost the performance of Windows and your
PC. Here is a selection of some of the best and some of our favorites.
108
CHAPTER 6 ■ HACKS, TWEAKS, AND COMMON CHANGES
Fun Tweaks
Lastly, we thought we’d include a few tweaks that exist purely for fun. We have no idea
why you’d want to do these other than to play a practical joke on somebody, so if you do
please be responsible and set things back afterward.
109
CHAPTER 6 ■ HACKS, TWEAKS, AND COMMON CHANGES
Summary
These are just a few of the thousands of Registry hacks and tweaks that are available for
Windows users and system administrators. If you have a favorite you’d like to see included
in the next edition of this book, then by all means contact us and let us know what it is.
110
Index
A Vista and Windows 7, 63–64
Windows 8 and
Administrative tweaks Windows 8.1, 64–65
AHCI, 107 Anti-Malware, 78
Control Panel Applet Names, 102
App tweaks, 101
Enable/Disable Task
Automatic startup repair, 45
Manager link, 105
Encrypt/Decrypt Options, 105
File Explorer B
Computer view, 103
ile and folder ownership, 104 BitLocker Drive Encryption, 84, 86–87
ile timestamp, 106
IPv6, 107 C, D
low disk space, 106
Mobility Center, 105 CCleaner tool, 39
RegEdit, 103 Check Disk (ChkDsk and ChkNTFS), 37
Shut Down command, 102 Coniguration Manager (CM), 33
Shut Down/Restart Options, 101 Corruption
starts and shuts down, windows, 105 automatic startup repair, 45
taskbar balloon notiications, 104 causes, 33
temporary iles, 105 CCleaner tool, 39
USB lash drive, 107 ChkDsk, 37
Windows installation, 104 Coniguration Manager, 33
Windows Malicious Software coniguration option, 47
Removal Tool, 106 hardware/device driver failure, 35
Windows Security Center, 106 NTFS, 34
Advanced Host Controller Interface
roll back driver, 48
(AHCI), 107
software installation/application
Advanced troubleshooting, 51
Booting Windows, 69–70 failure, 34
former option, 63 System File Checker, 36
Windows installation media, RegEdit System Restore
portable OS, 66–67 activities, 41
Portable Windows OS advanced boot options, 43
USB Flash Drive, 68–69 GUI, 42
system recovery disk/USB recovery environment, 45
recovery drive, 65–66 system properties, 40
111
■INDEX
E
P, Q
Encrypted ile system (EFS), 105 Password security
Encryption deinition, 88
BitLocker Drive Encryption, 84, 86–87 Local Security Policy Editor, 90
MBAM, 87 MBSA tool, 88–89
third-party drive encryption Microsoft’s security policy, 90
software, 84 Peek Operation Time, 94
TPM Administration tool, 85 Performance tweaks, 108
username/password Physical security
combination, 84 Driver Signature Enforcement, 75
physical access restrictions, 77
Remote Management
F Users group, 74–75
FileMon (File Monitor), 26 Remote Registry Service, 73
Fun tweaks, 109 PowerShell, 22
Process Monitor Format (PML), 25
Process Monitor (ProcMon)
G advanced iltering, 27
Group Policy Preferences (GPPs) column selection options, 27
action conditions, 61 ile system, 25
administrative credentials, 59 ilter toggle buttons, 26
registry key options, 60 properties, 30
results, 28
H, I, J, K, L
Hardware/device driver failure, 35 R
HKEY_CLASSES_ROOT (HKCR), 4 RegEdit
HKEY_CURRENT_CONFIG (HKCC), 5 edit menu, 15
HKEY_CURRENT_USER (HKCU), 4 ile menu, 13
HKEY_LOCAL_MACHINE (HKLM), 4 operations, 12
HKEY_PERFORMANCE_DATA, 6 start screen, 11
HKEY_USERS (HKU), 5 RegEdit.exe
HKEY_USERS Hive, 52
NTuser.dat in, 53
M Windows Snap feature, 53
Microsoft Baseline Security working principles, 52
Analyzer (MBSA), 88–89 REG.EXE and REGINI.EXE, 18
Microsoft BitLocker Administration and Registry Cleaners, 30
Monitoring 2.5 (MBAM), 87 Registry iles, 51, 62
Microsoft management GPPs (see Group Policy
console (MMC), 54 Preferences (GPPs))
Regedit.exe (see Regedit.exe)
remote administration
N group policy editor, 54–55
New Technology File System (NTFS), 34 Start Screen, 56–57
Windows Firewall, 56
remote registry service (see Remote
O registry service)
Original Equipment Windows PowerShell (see Windows
Manufacturers (OEMs), 35 PowerShell)
112
■INDEX
defragment, 99
Drive Letter Before
S Volume Name, 96
ScanReg, 24 DWORD, 97
Software installation/application hide unwanted apps, 99
failure, 34 open command prompt option, 99
System File Checker (SFC), 36 Open with Notepad option, 99
System Restore Recycle Bin, Computer View, 98
activities, 41 remove programs, 100
advanced boot options, 43 troubleshoot compatibility, 100
GUI, 42 ile/folder, 95
recovery environment, 45 Never Combine Hide
system properties, 40 Labels option, 94
Peek Operation Time, 94
pin folders, 95
T Show Classic, 95
Taskbar Program Preview Icons, 94 Taskbar Icons to Reopen
Taskbar humbnail Icons, 95 Last Active Window, 94
Tools and utilities Taskbar Program Preview Icons, 94
cleaners, 30 Taskbar humbnail Icons, 95
PowerShell, 22 Web service, 98
RegEdit User Protection. See User account
edit menu, 15 control (UAC)
ile menu, 13
operations, 12
start screen, 11 W, X, Y, Z
REG.EXE and REGINI.EXE, 18 Windows Malicious Software
ScanReg, 24 Removal Tool, 106
Tools and utilities. See Process Monitor Windows management
(ProcMon) instrumentation (WMI), 54
Windows PowerShell, 59
Windows Registry
U, V databases, 1
User account control (UAC), 80 keys and values
Admin Approval Mode, 82 HKCC, 5
breaches, malware, and HKCR, 4
Registry corruption, 80 HKCU, 4
elevation prompt types, 83 HKEY_PERFORMANCE_DATA, 6
purpose of, 81 HKLM, 4
setting up, 81 HKU, 5
standard user accounts, 82 main registry iles, 2
User interface tweaks meaning, 2
arrow icons, 96 .reg iles, 7
disable desktop shake, 95 value types, 6
113
Windows
Troubleshooting
Series
.reg Files.................................................................................................. 7
Summary ................................................................................................. 9
■ Chapter 2: Registry Tools and Utilities ......................................... 11
RegEdit .................................................................................................. 11
File Menu ................................................................................................................ 13
Edit Menu................................................................................................................ 15
REG.EXE and REGINI.EXE ....................................................................... 18
vii
■CONTENTS
Summary ............................................................................................... 50
■ Chapter 4: Working with Other Users’ Registry
Files/Advanced Troubleshooting .................................................. 51
Working on Other Users’ Registry Files ................................................. 51
RegEdit.exe ............................................................................................................. 52
Remote Administration ........................................................................................... 54
Connecting to a Remote Registry ........................................................................... 57
Windows PowerShell .............................................................................................. 59
Using Group Policy Preferences.............................................................................. 59
viii
■CONTENTS
Summary ............................................................................................... 71
■ Chapter 5: Securing the Registry ................................................. 73
Physical Security—Locking the Door .................................................... 73
Disable the Remote Registry Service ..................................................................... 73
Restrict Remote Users ............................................................................................ 74
Driver Signature Enforcement ................................................................................ 75
Restrict Physical Access ......................................................................................... 77
ix
■CONTENTS
x
■CONTENTS
xi
About the Authors
xiii
About the Technical
Reviewer
xv