Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I unregister COM dlls initially added with RegSvr32 when the /u arg doesn't work?

Right, initially ran:

c:\regsvr32 Amazing.dll

then, (accidentally - I might add) I must have run it again, and (indeed) again when new versions of 'Amazing.dll' were released. Yes - I know now I should've run:

c:\regsvr32 /u Amazing.dll

beforehand - but hey! I forgot.

To cut to the chase, when add the COM reference in VS, I can see 3 instances of 'Amazing' all pointing to the same location (c:\Amazing.dll), running regsvr32 /u removes one of the references, the second time - does nothing...

How do I get rid of these references? Am I looking at a regedit scenario? - If so - what exactly happens if I delete one of the keys???

Cheers

like image 493
Charlotte Skardon Avatar asked Aug 21 '08 12:08

Charlotte Skardon


People also ask

How do I unregister ActiveX control?

Unregister it by using the following command: Regsvr32 /u “<. ocx file path>" A dialog will pop up to confirm it succeeded.


2 Answers

Your object's GUID's should not be changing. In other words, once you register the COM object, re-registering shouldn't be adding anything additional to the registry.

Unless you added additional COM interfaces or objects to the project.

In any case, if this is a one time deal (and it sounds like it is), open regedit and delete the unneeded keys manually.

like image 54
Scott Marlowe Avatar answered Oct 05 '22 10:10

Scott Marlowe


There's a tool by MS that is still floating around and has been since Win95 days which scans the registry and does stuff like finds COM keys that aren't pointing at a valid file anymore etc called RegClean (I found it here: http://downloads.zdnet.com/abstract.aspx?assetid=881470&node=2094) which I've seen some places still using particularly when messing with legacy COM stuff in VB which are generating new COM GUIDs after every build.

So if you got that, then unreg'd and deleted or moved the file, run the app and it will clean out the "orphaned" entries.

If you do decide to remove the keys using RegEdit, you might need to remove the class ids as well as the guid entries.

like image 35
Shaun Austin Avatar answered Oct 05 '22 10:10

Shaun Austin