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.

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:

  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:

Now, if you click any DLL file, you will see Register and Unregister commands.

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.

Support us

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!

Author: Sergey Tkachenko

Sergey Tkachenko is a software developer who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.

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

  1. 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

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

      1. 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

Leave a Reply

Your email address will not be published.

Exit mobile version
Using Telegram? Subscribe to the blog channel!
Hello. Add your message here.