Subscribe to Windows IT Pro

 

Get Newsletters

  • Get the Latest News
  • Product Updates
  • Helpful Tricks
  • Productivity Tips

Subscribe Now!

November 01, 2002 12:00 AM

How can I stop Windows from caching a .dll file after I close the program that was accessing it?

Windows IT Pro
InstantDoc ID #27128
Rating: (0)

A. Windows caches Windows Explorer and shell-extention .dll files to save disk I/O. However, even after you close the calling program, the.dll file remains cached. To stop Windows from caching .dll files after you've closed the calling program, perform the following steps:

  1. Start a registry editor (e.g., regedit.exe).
  2. Navigate to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer registry subkey.
  3. From the Edit menu, select New, DWORD Value.
  4. Enter the name AlwaysUnloadDLL, then press Enter.
  5. Double-click the new value, set it to 1, then click OK.
  6. Close the registry editor, then reboot the machine for the change to take effect.

A shell-extension .dll is one that provides a shell-namespace extension or menu extension (e.g., WinZip's extension .dll lets you easily compress folders from a context menu item in Windows Explorer). By default, Windows Explorer loads shell-extension .dll files and keeps them loaded, even when they aren't being directly accessed (e.g., the namespace they provide isn't being used and no menus are active). Note that Windows Explorer is an active application and uses .dll files. The registry value simply has Windows Explorer unload these .dll files when not in use, which is useful for developers of such .dll files who want to test, fix, and retest their .dll files without having to restart Windows Explorer. Thanks to Mark Russinovich for his help with this FAQ.

Related Content:

ARTICLE TOOLS

Comments
  • Wayne Scott
    8 years ago
    May 19, 2004

    Is there a way to force the explorer to unload a given DLL? In other words can I write an uninstaller for an explorer shell extension that doesn't require a reboot?

  • Gennady Nesanelis
    10 years ago
    Nov 06, 2002

    John,

    At least on one of our PC I found AlwaysUnloadDLL set not as DWORD value set to 1 to the HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer subkey but as a subkey to the Explorer subkey with the default value set to "1" (DWORD). Does it really matter?

    Thank you,

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

White Papers

Get your Windows 7 deployment off to the right start by implementing PC lockdown. A locked-down environment is easier and cheaper to support since users are less likely to make unnecessary changes to the core system configuration - read more here!

Essential Guides

Is your iSCSI "lossy"? The reality is that most off-the-shelf Ethernet hardware deployed for iSCSI can lose packets, resulting in slow performance or application downtime. Learn how to assess your current iSCSI infrastructure and engineer an advanced iSCSI SAN infrastructure.

Web Seminars

What's the best way to keep your network safe from malware? In this web seminar, security expert Greg Shields suggests an alternative method to the traditional blacklisting approach that is common with anti-virus and anti-malware solutions.

eLearning Series

We bring the experts direct to you to share their real-world perspective and expertise. During each event, three sessions stream in real time, so you can learn, ask questions, and get solutions.
Upcoming event: Getting the Most with Exchange 2010 with Paul Robichaux

Subscribe to Windows IT Pro!

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.