Mastering Windows XP Registry.pdf

(3755 KB) Pobierz
Microsoft Word - Mastering Windows XP Registry.doc
Mastering Windows XP Registry
Peter Hipson
Associate Publisher: Joel Fugazzotto
Acquisitions and Developmental Editor: Ellen L. Dendy
Editor: Anamary Ehlen
Production Editor: Elizabeth Campbell
Technical Editor: Donald Fuller
Electronic Publishing Specialist: Maureen Forys, Happenstance Type-O-Rama
Proofreaders: Nanette Duffy, Emily Hsuan, Laurie O'Connell, Yariv Rabinovitch, Nancy
Riddiough
Book Designer: Maureen Forys, Happenstance Type-O-Rama
Indexer: Ted Laux
Cover Designer: Design Site
Cover Illustrator: Sergie Loobkoff
Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World
rights reserved. The author(s) created reusable code in this publication expressly for reuse by
readers. Sybex grants readers limited permission to reuse the code found in this publication or
its accompanying CD-ROM so long as the author is attributed in any application containing
the reusable code and the code itself is never distributed, posted online by electronic
transmission, sold, or commercially exploited as a stand-alone product. Aside from this
specific exception concerning reusable code, no part of this publication may be stored in a
retrieval system, transmitted, or reproduced in any way, including but not limited to
photocopy, photograph, magnetic, or other record, without the prior agreement and written
permission of the publisher.
First edition copyright © 2000 SYBEX Inc.
Library of Congress Card Number: 2002100057
ISBN: 0-7821-2987-0
SYBEX and the SYBEX logo are either registered trademarks or trademarks of SYBEX Inc.
in the United States and/or other countries.
Mastering is a trademark of SYBEX Inc.
Screen reproductions produced with FullShot 99. FullShot 99 © 1991-1999 Inbit
Incorporated. All rights reserved.FullShot is a trademark of Inbit Incorporated.
TRADEMARKS: SYBEX has attempted throughout this book to distinguish proprietary
trademarks from descriptive terms by following the capitalization style used by the
manufacturer.
The author and publisher have made their best efforts to prepare this book, and the content is
based upon final release software whenever possible. Portions of the manuscript may be based
upon pre-release versions supplied by software manufacturer(s). The author and the publisher
make no representation or warranties of any kind with regard to the completeness or accuracy
of the contents herein and accept no liability of any kind including but not limited to
performance, merchantability, fitness for any particular purpose, or any losses or damages of
any kind caused or alleged to be caused directly or indirectly from this book.
This book is dedicated to my students at FPC. Perhaps the hardest part of their education is
putting up with me. I expect a lot, and they give it.
Acknowledgments
An acknowledgments section is always hard to write; there are just so many people who have
helped. An author's greatest fear is forgetting someone, so I always start off by saying thanks
to everyone. If I didn't list you, please don't hate me!
Thanks go to Ellen Dendy, of course, who served as acquisitions and developmental editor for
this book. Ellen Dendy also helped greatly by providing critical direction whenever needed.
(Of course, if you don't like this book, the blame falls on me and only me!)
Thanks to the Sybex editorial staff, especially Anamary. Thanks also to Elizabeth Campbell,
production editor, for her skillful work and management; to Maureen Forys, electronic
publishing specialist, for her expert and speedy layout skills; and to Nanette Duffy, Emily
Hsuan, Laurie O'Connell, Yariv Rabinovitch, and Nancy Riddiough, proofreaders, for their
proficient proofreading of the pages.
Don Fuller served well as our technical editor. It was Don's job to make sure that I told no
lies, made no mistakes.
Jerold Schulman (JSI, Inc.) maintains the web page at http://www.jsiinc.com/reghack.htm . He
provided a lot of expert hints for this book. If you need assistance with your Windows XP
installation, check out Jerold's web pages for his tips, tricks, and registry hacks.
Special thanks to Laura Belt at Adler & Robin Books. Laura is the person who makes this a
business and not a hobby.
Thanks to Barry and Marcia Press for their input on the book's contents. Barry asked for a
number of things to be covered, and I've covered as many as I could.
Thanks to the ExpertZone (and my team members who put up with my slow responses), and
everyone at Microsoft who helped, too.
Of course, I would be remiss if I didn't thank my family, especially my wife, Nang, who has
supported me through thick and thin, and the folks at CMC and MCH who made sure that I
survived the experience.
This book is dedicated to my students at FPC. Perhaps the hardest part of their education is
putting up with me. I expect a lot, and give it.
Introduction
The registry has evoked emotions from terror to mystery. Few Windows XP users consider
the registry their friend. After all, think of it: The registry is the heart and soul of the
Windows XP operating system. The registry is everything-it is the brain of the operating
system. Damage the registry, and Windows XP quickly develops brain damage and needs
major surgery.
This is it-the only book on the Windows XP registry that you will need. Now, I won't kid you;
there are a few other books on the Windows registry. Every current version of Windows uses
a similar registry structure, but we do find that there are sufficient differences between them
make it difficult for one book to cover everything well.
Will you need another book or tool besides this book? Maybe not. But I do recommend that
you get Microsoft's Windows XP Resource Kit, too; it has a lot of good utilities that you will
find invaluable. The Windows XP Resource Kit also has a lot of good non-registry stuff.
This book covers the Windows XP registry from A to Z. I've covered the standard stuff, from
things that most of us should know to things that are not documented at all and are probably
only known by a very few first-rate system administrators.
Who Is This Book For?
This book is valuable to all Windows XP users. Even users of Windows NT 4 and 2000 and
Windows 95/98/Me may find good information in this book, though it is primarily oriented
toward Windows XP.
This book is intended for:
General users who use Windows XP at their desks and are responsible for their own
computer(s). Typically, these users don't have responsibility for other users'
computers, though they may help their friends out from time to time.
System administrators who are responsible for an organization's computers (and
perhaps thousands of Windows XP installations). Administrators will be presented
with virtually every conceivable problem over a given period of time. Whatever can
go wrong will; Murphy's Law is applied double to system administrators.
Help desk staff who support users, even if they don't usually administer the system.
Help desk staff roam throughout the organization, providing help and assistance as
needed. All help desk people are going to find this book very useful.
If you are a user who wants to get the most out of your Windows XP installation (either Home
Edition, Professional, or one of the upcoming .NET Server versions), this book is a very good
starting point. Think of it this way: If you are a system administrator, this book is one of the
tools that you will need to manage and administer your Windows XP network. Manning the
help desk? If so, having this book close at hand can save you lots of time and effort.
Overview of the Contents
This book is made up of four major sections.
Part I: Registry Basics
In Part I , "Registry Basics," I discuss ways to avoid problems, do backups, and restore the
registry, and I cover some of the tools that are used with the registry. The first chapter, "What
Is a Registry—and Why?," introduces the registry. You'll learn about the registry's major
sections, called hives. This chapter also tells you about the registry's history.
Tip The fastest way to access the registry is to use RegEdit.exe, which comes with Windows
XP. To access RegEdit.exe, simply click the Start button, then click Run. Type RegEdit
in the dialog box and press Enter. The RegEdit window will appear.
Chapter 2 is called "Readme.1st: Preventing Disaster!" It jumps right into one of the most
important topics in this book: how to avoid getting into trouble. Most Windows XP disasters
are registry related, and they are also preventable. Registry problems often arise because we
don't have a good backup of the registry, and something comes along and damages it. Once
damaged, the registry can be very difficult to recover.
Chapter 3 , "Anatomy of the Registry: The Blood, Gore, and Guts," is an in-depth analysis of
what's in the registry. Each major hive is covered in detail. We'll discuss the way the hives
relate to each other, along with how Windows XP manages users in the registry.
Tools, tools, and more tools. Chapter 4 , "Registry Tools and Tips: Getting the Work Done,"
takes a close look at the registry tools that are included with Windows XP. The Registry
Editor is covered, as well as the Backup utility and the registry software that is included in the
Windows XP Resource Kit.
In Chapter 5 , "Policies: Good for One, Good for All," you learn all about policies in Windows
XP. Policies affect specific computers, users, and groups.
Part II: Advanced Registry Stuff
In this second part of the book, I cover OLE (Object Linking and Embedding), some history
of the win.ini and system.ini files, how to remove excess baggage from the registry, registry
programming interfaces, and the Performance Monitor entries. Getting into the advanced
stuff, we jump right into the issues of OLE, associations, and such. Chapter 6 is called
"Associations, Linkages, and OLE: How Confusing Can This Get?" It tries to clear the often
muddy water that swirls around the OLE registry components. A major part of the registry is
OLE related, with Windows XP using OLE to manage much of the user interface.
Even though the System.ini and Win.ini files have not been used for some time, we still have
them. Chapter 7 is called "Why, Oh Why, Are There System.ini and Win.ini Files?" Here we
delve into why these two files are still found under Windows and what makes them necessary.
If you want to get rid of that memo from your boss telling you that your project is due, you
toss it into the trash can. Something in the registry that is not needed can be more difficult to
get rid of. Chapter 8 , "Getting Rid of the Unwanted," introduces the problem of registry
clutter and describes some very useful tools to clean up this excess.
By following the advice in Chapter 9 , "Recovering from Disaster, or Making the Best of a
Bad Situation," you can make sure that disaster doesn't strike. However, sometimes disaster
just happens. Recovery, whether from backups or from manually cleaning the registry, is
vital.
My name's Peter, and I'm a programmer. Ah, there, I said it, and I feel much better. I felt even
better after writing Chapter 10 , "Programming and the Registry: A Developer's Paradise?"
This is where the programming interface to the registry is unveiled. Examples in C/C++ and a
lot of information about Microsoft's MFC registry interface come to light in this chapter.
The Windows XP Performance Monitor allows analysis of the system's performance and the
development of performance-enhancement strategies. In Chapter 11 , "The Performance
Monitor Meets the Registry," you begin to understand how the Windows XP Performance
Monitor interacts with the registry and how you can add performance-monitoring
technologies to your own applications.
Part III: Windows and Office Registry Entries
In Part III , I discuss the UI (user interface), networking, and internal Windows XP entries.
What we see as users is all stored in the registry. Chapter 12 , "The Windows XP User
Interface: Changing How It Looks," delves into the various registry entries that control the
look and feel of Windows XP. This chapter covers both the graphical Desktop and the
Windows command windows.
Under the hood of Windows XP are entries in the registry for both networking and other
internal Windows XP components. Chapter 13 , "Networking and Registry System Entries,"
digs into these less visible entries in the registry and explains them to you.
Chapter 14 , "Microsoft Office Entries," covers changes that Microsoft Office has made to the
registry. Sometimes Microsoft Office components are installed and then removed. Sadly, not
all registry entries for these products are removed. How do you get them out of there? Also,
how do you create a configuration so those new users of Microsoft Office will get a
predefined configuration? Care to program the registry using Visual Basic for Applications?
(It's easy, really.) Check this chapter for the answers to these questions.
Part IV: The Registry Interface
Part IV is a reference to many of the registry entries, arranged by hive. Program associations,
OLE associations, and file-type management are all part of HKEY_CLASSES_ROOT.
Chapter 15 , "Introduction to HKEY_CLASSES_ROOT," covers this hive's contents.
User information that is stored in HKEY_USERS and used in HKEY_CURRENT_USER is
the subject of Chapter 16 , "Introduction to HKEY_CURRENT_USER and HKEY_USERS."
Windows XP keeps only the currently logged-on user and the .DEFAULT user in
HKEY_USERS; other users are saved in HKEY_LOCAL_MACHINE's SAM (Security
Accounts Manager) sections.
Zgłoś jeśli naruszono regulamin