How to Prevent Windows from Caching DLLs after Closing Associated Program

I've been experiencing this problem a lot of times when I tried to safely remove my USB drive from the computer.

I always get this message "Problem Ejecting USB Mass Storage Device: The device 'Generic volume' cannot be stopped right now. Try stopping the device again later."

I'm sure that I've already closed all files, folders and applications that I've launched from my USB. Unknowingly, some of the applications DLL were cached by windows. So even if the application is already closed the DLL is still running in the background.

So I need to figure out in the task manager of what process is still using the DLL. That is hard for me to identify which was the real process associated with that application in which I also do not have idea of what application is that out of so many applications that I've opened.

And luckily found out a registry tweak on How to Prevent Windows from Caching DLLs whenever a program associated with it is closed.

Always remember to pay careful attention when doing registry tweaks as you can break windows causing boot failure.
To do that, follow the steps below:
1.) Press Windows Button+R to open Run.
2.) Type in regedit.exe and Press Enter.
3.) On the Registry Editor Window, Navigate to the Key Name below.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer
4.) While Explorer key is selected, Right click on it and create a New > DWORD value as you can see below.

5.) After the new value is created, rename it to "AlwaysUnloadDLL". Then double click to assign with a value 1.

This tweak needs reboot to make it work.

Comments

Popular posts from this blog

How to Create a Configuration.INI Files in VB6

How to Set Windows Form Always on Top of Other Applications in VB6

How to Minimize/Send an App Icon to System Tray in Visual Basic 6