29 December 2005

XP Registry - SharedDLLs

My XP installation is from 2001 and i set pride in keeping it that way, meaning i do not intend to reinstall XP ever. Any problem that arises is something that can be fixed with good research.

My boot process has over the years gotten slower and slower. Tonight I was fiddling with the registry and found the node: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs

The size of the data in the node made me make an export, the filesize went up to an amasing 1.5Mb of clear text entries in this single node. SharedDLLs contains an entry to all resources installer programs have found to be worth noting as shared, if the file already exists a counter value is increased by one, when uninstalling an application with a shared dll the shared file is only removed if the value is 1 meaning there only is this one application using the shared file, otherwise the dll is left so the other application keeps functioning.

In a controlled envirenment this is great, but in the real world there are many DLLs that get to be marked as shared but really are only used by the actual parent application. My boot time had just increased very sharply and i discovered that there was 4000 entries with the files from the game i just installed, being resource files, help files, the lot. This was half of the total of 8000 entries in the node.

I removed the 4000 entries that where obviously not shared resources but a mistake in the use of the installer program, at the same time I removed old applications no longer installed. This removed 1Mb from the export file, leaving it at 350kb.

A reboot showed a dramatic improvement my boot "logo" time was now down to 40 seconds. It has not been that short in years.

Further pruning the entries for files that i am sure wont be shared among applications resulted in an export file for the node of only 160kb. Boot "logo" time is not 30-35 seconds. Microsoft people says you should not mess with entries in SharedDLLs, but if you are considering reinstalling because of high boot time, try having a look into pruning the SharedDLLs key.

2 comments:

Anonymous said...

FYI, the SharedDLLs key isn't necessarily for tracking only DLLs. Anything that is part of a common framework is fair game in that key, including help files, executables, or even documentation. As long as the uninstallers are designed properly, deleting entries in that key shouldn't cause any adverse problems, but it might mean that certain shared files are not properly uninstalled with the application that installed them.

If you want a relatively safe way to clean out the SharedDlls folder, you can always use a utility that Microsoft designed for Windows 95 that removes SharedDlls entries that no longer exist. See http://support.microsoft.com/kb/217165 I guess the other option would be to use something like the registry cleanup scanner at http://safety.live.com/ But be cautious with it because I've had programs break as a result of it.

Anonymous said...

Thanks for the tip! Good to know.