65.9K
CodeProject is changing. Read more.
Home

How to register DLL files from the Explorer

starIconstarIconstarIconstarIcon
emptyStarIcon
starIcon

4.57/5 (4 votes)

Aug 6, 2002

viewsIcon

109882

When we select a dll file in the explorer we can register/unregister it (by Regsvr32)

Sample Image - ContextMenu.jpg

Introduction

Have you ever wanted to register DLL files from the Explorer? DLL files that export DllRegisterServer and DllUnregisterServer (as COM DLL files do) can easily be controlled from the Explorer while selected. You can register/unregister it as seen in the image above. To enable this feature, add subkeys to the registry under HKEY_CLASSES_ROOT\dllfile, as in the following:

Registry Image - dllfile.jpg

What is regsvr32?

Regsvr32 is an executable file that gets a DLL file name as an argument and runs its DllRegisterServer function (if exists). As for uninstall, just add the '/u' argument and it calls DllUnregisterServer function (if exists).

That's all.