Register and unregister components with context menus

Register and unregister components with context menus

The stardard method to register and unregister ActiveX component is running the REGSVR32 utility, which forces you to bring up the Start|Run dialog and manually type the command line. A much better approach is to have the Register and Unregister commands right in the context menu that appears when you right-click a DLL, EXE, or OCX file in the Explorer window.

To create these menu commands, copy the following text to the clipboard, paste it into an editor (such as Notepad) and save it to a file with a .reg extension, such as ActiveX.Reg. Then double-click the file, and voila!, you’ll be able to register and unregister all types of ActiveX components by right-clicking on them.

Note that the .reg file below assumes that the REGSVR32.EXE utility is your system path, so that it can be run without specifying the complete path. If this is not the case you should move it to the main Windows directory (e.g. C:WINDOWS or C:WINNT) or you should provide the complete path in all the lines of the .reg file that reference it.


Start of the REG file

REGEDIT4; ActiveX DLLs[HKEY_CLASSES_ROOT.dll]@=”dllfile”[HKEY_CLASSES_ROOTdllfileshell
egdll]@=”Register ActiveX DLL”[HKEY_CLASSES_ROOTdllfileshell
egdllcommand]@=”regsvr32.exe “%L””[HKEY_CLASSES_ROOTdllfileshellunregdll]@=”Unregister ActiveX DLL”[HKEY_CLASSES_ROOTdllfileshellunregdllcommand]@=”regsvr32.exe /u “%L””; ActiveX Controls[HKEY_CLASSES_ROOT.ocx]@=”ocxfile”[HKEY_CLASSES_ROOTocxfileshell
egocx]@=”Register OCX Control”[HKEY_CLASSES_ROOTocxfileshell
egocxcommand]@=”regsvr32.exe “%L””[HKEY_CLASSES_ROOTocxfileshellunregocx]@=”Unregister OCX Control”[HKEY_CLASSES_ROOTocxfileshellunregocxcommand]@=”regsvr32.exe /u “%L””; ActiveX EXEs[HKEY_CLASSES_ROOT.exe]@=”exefile”[HKEY_CLASSES_ROOTexefileshell
egexe]@=”Register ActiveX EXE”[HKEY_CLASSES_ROOTexefileshell
egexecommand]@=””%L” /regserver”[HKEY_CLASSES_ROOTexefileshellunregexe]@=”Unregister Active EXE”[HKEY_CLASSES_ROOTexefileshellunregexecommand]@=””%L” /unregserver”


End of the REG file

Share the Post:
Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular

XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved

AI is revolutionizing fraud detection

How AI is Revolutionizing Fraud Detection

Artificial intelligence – commonly known as AI – means a form of technology with multiple uses. As a result, it has become extremely valuable to a number of businesses across

AI innovation

Companies Leading AI Innovation in 2023

Artificial intelligence (AI) has been transforming industries and revolutionizing business operations. AI’s potential to enhance efficiency and productivity has become crucial to many businesses. As we move into 2023, several

data fivetran pricing

Fivetran Pricing Explained

One of the biggest trends of the 21st century is the massive surge in analytics. Analytics is the process of utilizing data to drive future decision-making. With so much of

kubernetes logging

Kubernetes Logging: What You Need to Know

Kubernetes from Google is one of the most popular open-source and free container management solutions made to make managing and deploying applications easier. It has a solid architecture that makes