Jump to content

Remove keys for removed .Net Assemblies


shu

Recommended Posts

It will be nice to find and remove COM stuff in the registry which references to the deleted dlls. Particularly when we register some .Net Assembly using RegAsm.exe we have lots of COM classes registered in the registry from this dll.

 

F.g. HKEY_CLASSES_ROOT/CLSID/{SOME GUID} should be deleted if

 

HKEY_CLASSES_ROOT/CLSID/{SOME GUID}/InprocServer32/CodeBase references to the dll which is no more available

 

Take into account that CodeBase can be in form of the url like "file:///C:\path\to.dll" and the path can have standard Windows substitutes like

"%WINDIR%\path\to.dll" or "%CommonProgramFiles%\path\to.dll"

 

Also there can be removed just one of the dll versions so no need to delete entire KEY. It should be analyzed the subkeys of the HKEY_CLASSES_ROOT/CLSID/{SOME GUID}/InprocServer32 which has the form of the version number

 

F.g.

HKEY_CLASSES_ROOT\CLSID\{Some GUID}\InprocServer32\1.0.4.2115 where CodeBase reference to the dll for this assembly version. In this case we need to remove only 1.0.4.2115 key with its contents.

 

Also if we remove some HKEY_CLASSES_ROOT\CLSID\{Some GUID} we need to remove any other encountered keys where this {Some GUID} is referenced.

 

 

Thank you.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.