I have a software product that optionally installs Shell Extension in Windows Explorer. This is done in C # and uses the .NET Framework v4.0. The shell extension is installed by Inno Setup during installation using regasm.exe. Everything works fine until I want to install an updated version of the application. The problem is that I cannot update the shell dll because it is loaded into researchers' memory. Before installing Inno Setup, the following message is displayed

It says that the installer must exit Windows Explorer because it uses files that the installer needs to update. It terminates the explorer process, but does not start it again. This is my first problem.
In fact, I do not want to force the user to disconnect the explorer. But I do not know how to unload the managed dll shell from the researchers' memory. If you delete it using regasm.exe, the dll will still remain in memory. In fact, I canβt find the place where this check occurs, because I received installation sources already done.
The file add-in (IssProc.dll) for Inno Setup does not help, because as soon as I finish Windows Explorer with this add-in, the explorer immediately reboots.
How can I solve this problem? How can I update shell dlls with improved user interface? And maybe someone can give me a hint that the code that checks the files used is placed?
O and BTW I am using Windows 7 x64.
source share