Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


September 2006

Registry Junk: A Windows Fact of Life

RSS
Subscribe to Windows IT Pro | See More Registry Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!
Main Article    Ask the Experts, September 2006

Registry cleaners have always been popular, but I never paid much attention to them. I originally thought that there might be valid reasons for their existence, but over time I changed my mind. But recently I've come to recognize that even today they can help maintain registry hygiene.

It used to be common for developers to write their own application installation routines to avoid paying hundreds of dollars for commercial setup toolkits. Their focus in coding installers was the installation part of setup because coding uninstallers is in some sense an admission that the software you've developed might not be useful or robust enough to become a permanent fixture on end-user systems. As a result, software uninstalls were often incomplete, leaving behind registry and file system detritus. A few hundred kilobytes of unused keys and values causes no noticeable performance impact on system operation, but I figured it was natural for a registry cleaner to be an essential part of running a tight ship for the anal-retentive systems administrator.

Installer technology has come a long way and today there are dozens of reliable freeware and low-cost installation toolkits available both for old-style and Windows Installer Package (.msi)-based setup. I previously believed that meant the end of registry scrap and any reason for the existence of registry cleaners. However, one of the Regmon troubleshooting examples Dave Solomon and I present in our Windows Internals seminars made me realize that it's common for even best-of-breed uninstallers that have earned the Windows logo from Microsoft to leave our registries littered with traces of applications deleted long ago.

The troubleshooting example that triggered my realization is one in which a user discovered that Microsoft Internet Explorer (IE) would hang on startup unless he'd used his ISP's dialer to establish an Internet connection before opening IE. The user captured a Regmon trace of the hang and found references to his previous ISP's dialer in the RAS Phonebook key under the HKEY_ CURRENT_USER area of the registry. After deleting the stale values, the new ISP's dialer began launching like it was supposed to when IE opened.

Some research on my part suggests that the user had manually configured a RAS phonebook entry, and when he changed ISPs had forgotten to update the entry. But the fact that the problematic key in the example was in the per-user part of the registry got me thinking. If the user's old dialer had created the phonebook entry automatically, then been uninstalled from a different account, the user would've been left with a broken IE configuration. That's because uninstallers typically delete their application's systemwide settings from the HKEY_LOCAL_MACHINE part of the registry and any per-user settings of the user running the uninstaller from HKEY_CURRENT_USER. But what happens to the per-user settings of the other users that used the application? You guessed it: Registry junk gets created, and perhaps also file system junk in the application's Application Data folder in the \Documents and Settings directories of other users. An uninstall is thorough only if the user performing it is the only one that used the software.

Uninstallers that want to be as meticulous as possible could use the LoadUserProfile Windows API to load each profile stored on the system, as listed in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\Current-Version\ProfileList, and look for their application settings in other profiles. The problem with that approach is that registry permissions would likely prevent a user from deleting keys in other users' profiles. Even if permissions aren't an issue, domain users with roaming profiles carry application settings with them to other computers, so profiles that need to be updated might not be locally accessible.

So it appears that registry junk is a Windows fact of life and that registry cleaners will continue to have a place in the meticulous system administrator's tool chest, at least until we're all running Microsoft .NET applications that store their per-user settings in XML files . . . and then, of course, we'll need XML cleaners.
—Mark Russinovich

End of Article



Reader Comments

You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
Friday at PASS Europe 2006

Kevin talks about the closing day of the event and shares a funny Microsoft film. ...

The Memory-Optimization Hoax

Don't believe the hype. At best, RAM optimizers have no effect. At worst, they seriously degrade performance. ...

Escape From Yesterworld

Kevin points you to the funniest SQL Server website ever! ...


Windows OSs Whitepapers Replay for Exchange: Enterprise Protection and an Affordable Price

Are You Satisfied?

A Preliminary Look at Deployment Plans for Microsoft Windows Vista

Related Events Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.

Job Openings in IT


ADS BY GOOGLE SPONSORED LINKS FEATURED LINKS

Maximize your SharePoint Investment – 8 Cities
Discover best practices and tips for both architecting and administering SharePoint. Early Bird Price of $99 through Sept 15th.

Find a new job now on the all new IT Job Hound!
Search jobs, post your resume, and set up job e-mail alerts!

Master SharePoint with 3 eLearning Seminars
Learn how to build a better SharePoint infrastructure and enable powerful collaboration with MVPs Dan Holme and Michael Noel. Register today!

Top Tools for Virtualization Disaster Recovery & Replication
View this web seminar on August 14th to learn about two tools that will result in faster backup and restore with P2V disaster recovery.

SharePointConnections Conference Fall 2008
Don’t miss the premier event for Microsoft IT Professionals in Las Vegas, November 10-13. Register and book your room by August 25 and receive a FREE room night (based on a three night minimum stay).

VMworld 2008 - Sign Up Today!
Join your peers on September 15-18 at The Venetian Hotel in Las Vegas as VMware hosts VMworld 2008, the leading Virtualization event.



Entrust Unified Communications Certs
Secure Exchange 2007 and save 20%. Now through Sept. 2008.

Increase Application Performance
Free White Paper by Editor's Best winner, Texas Memory Systems.

Need to convert between XML, DBs, EDI, and Excel? Try MapForce free!
Drag & drop to transform between popular data formats – get results instantly or generate code.

Microsoft® Tech•Ed EMEA 2008 IT Professionals
Advance your thinking with new ideas and practical real-world solutions at Microsoft’s FIVE day technical infrastructure conference 3-7 Nov., 2008. Register before 26 September 2008 to save €300.

Order Your SQL Fundamentals CD Today!
Learn how to use SQL Server, understand Office integration techniques and dive into the essentials of SQL Express and Visual Basic with this free SQL Fundamentals CD.

Are You Really Compliant with Software Regulations?
View this web seminar that will help you with compliance best practices and check out a management solution to assure that you won’t be in jeopardy of an audit.

Virtualization Congress Oct. 14-16 in London
Don't miss Virtualization Congress, the premiere EMEA conference dedicated to hardware, OS and application virtualization. Oct. 14-16.
Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technical Resources Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing