views:

137

answers:

3

Using regsvr32, do you need to unregister a dll or ocx before registering it again?

Or will registering it do that anyway?

+2  A: 

You need to unregister before re-registering. It's not automatic.

allonym
I'm still puzzling over this one. If it is being registered again, then why is it necessary to unregister it first?
Mark Wilkins
A: 

regsvr32 calls an entrypoint (DllRegisterServer) in the DLL to do the registration, so I suppose it could possibly be DLL-dependent. But in general, the registration entrypoint simply updates the information in the registry. So there would be no need to unregister it first. For example, an OLE DB provider I helped write updates the GUID information and path to the DLL during the registration. There is no reason to unregister it in that case.

Mark Wilkins
A: 

You don't have to but it might mess you up if you don't...

rogerdpack