Add Register DLL context menu commands for DLL files in Windows 10

Sometimes it is useful to have the ability to re-register Windows DLL files to fix various issues in the operating system. Components of Windows which use COM/OLE/ActiveX servers need to be registered using regsvr32. For some reason, they can get unregistered and then some desktop apps won't work properly unless you register them using the command line. Having commands to register the DLL from the context menu makes this process faster. Here is how it can be done.


If you are interested in knowing for which scenarios you might need to re-register DLL files, take a look at the following article: Fix Windows Update issues in Windows 10 by resetting its options and files. Although Windows comes with troubleshooters and Fix It which handle this automatically, sometimes manual registration is the best way to do it.

Windows 10 register dll context menu in action fi

To add Register DLL context menu commands for DLL files in Windows 10, you need to apply a simple Registry tweak. For those who would like to avoid manual Registry editing, I made ready-to-use Registry files. You can download those files below (the undo file is included):

Download Registry files

If you prefer to apply the tweak manually, you need to do the following:

  1. Open Registry Editor.
  2. Go to the following Registry key:
    HKEY_CLASSES_ROOT\dllfile\shell

    Tip: See how to jump to the desired Registry key with one click.

  3. Create here a new subkey and name it Register
  4. Under the Register subkey you just add create a new subkey named Command.
    You will get the following path:

    HKEY_CLASSES_ROOT\dllfile\shell\Register\Command
  5. Double click the (Default) string parameter of the Command key and enter the following data:
    regsvr32.exe \"%1\"

    The result will be as follows: Windows 10 register dll register tweak

  6. Return to the subkey HKEY_CLASSES_ROOT\dllfile\shell. Create here Unregister\Command subkeys. You will get the following path:
    HKEY_CLASSES_ROOT\dllfile\shell\Unregister\Command
  7. Set the default parameter of the Command subkey to the following value:
    regsvr32.exe /u \"%1\"

    See the following screenshot: Windows 10 unregister dll tweak

Now, if you click any DLL file, you will see Register and Unregister commands. Windows 10 register dll context menu in action

Windows 10 register dll context menu You are done.
Bonus tip: It might be useful to add such commands to OCX files as well. To do it, you need to repeat the steps above in the subkey HKEY_CLASSES_ROOT\ocxfile\shell.

3 thoughts on “Add Register DLL context menu commands for DLL files in Windows 10

  1. Albert Herd

    I am trying to do this, but a slightly different reason. I’ve written an application which copies a DLL to GAC. Mostly for .NET uses.

    I’m trying to use the above so that I can launch the application by right clicking on the DLL, well basically what you’re doing above. Unfortunately, I cannot get it to work.

    I’ve started by trying to do it manually; adding records to the registry manually, such as described here https://stackoverflow.com/questions/20449316/how-add-context-menu-item-to-windows-explorer-for-folders . That did not work; I’ve tried your reg files, but still to no avail. They’re successfully written to the registry, but not appearing when right-clicking a DLL file. Maybe there’s some restriction to DLL files?

    Thanks.
    Albert

    Reply
    1. Sergey Tkachenko Post author

      Well, I have no idea. The context menu entries appear here.
      Which os edition/version you are running?

      Reply
      1. Albert Herd

        Currently running Windows 10 Version 1709 at the moment.

        Curiously enough, any change that I do to other extensions work immediately; it’s just the DLL file which refuse to do so. I’ve tried it on 3 copies of Windows 10 – all exhibiting the same behavior unfortunately.

        I’ve also tried: http://www.thewindowsclub.com/remove-click-context-menu-items-editors – curiously enough, when selecting DLL file, the input gets greyed out.

        Albert

        Reply

Leave a Reply

Your email address will not be published. Required fields are marked *