Register ActiveX DLLs and OCXs

Wouldn't be nice if you can just right-click and register / unregister ActiveX DLLs and OCXs, instead of having to execute regsvr32.exe?

All you have to do is copy / paste the below snippets to .reg files and merge them into your PC's registry.

Register / Unregister DLL

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\dllfile]
@="ActiveX DLL"
"AlwaysShowExt"=""
"EditFlags"=hex:01,00,00,00
"TileInfo"="prop:FileVersion;FileDescription"
"InfoTip"="prop:FileDescription;Company;FileVersion;Create;Size"
"NoOpen"=""

[HKEY_CLASSES_ROOT\dllfile\DefaultIcon]
@="%SystemRoot%\\system32\\SHELL32.dll,72"

[HKEY_CLASSES_ROOT\dllfile\Shell]

[HKEY_CLASSES_ROOT\dllfile\Shell\Register]
@="Register Server"

[HKEY_CLASSES_ROOT\dllfile\Shell\Register\Command]
@="regsvr32.exe \"%1\""

[HKEY_CLASSES_ROOT\dllfile\Shell\Unregister]
@="Unregister Server"

[HKEY_CLASSES_ROOT\dllfile\Shell\Unregister\Command]
@="regsvr32.exe /u \"%1\""

Register / Unregister OCX

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\ocxfile]
"NoOpen"="These files are small helper programs that can be used by other programs. Modifying them could make your computer less functional."
@="Active X Control"
"EditFlags"=dword:00000000
"BrowserFlags"=dword:00000008

[HKEY_CLASSES_ROOT\ocxfile\DefaultIcon]
@="%SystemRoot%\\system32\\SHELL32.dll,72"

[HKEY_CLASSES_ROOT\ocxfile\Shell]
@=""

[HKEY_CLASSES_ROOT\ocxfile\Shell\Register]
@="Register Server"

[HKEY_CLASSES_ROOT\ocxfile\Shell\Register\Command]
@="regsvr32.exe \"%1\""

[HKEY_CLASSES_ROOT\ocxfile\Shell\Unregister]
@="Unregister Server"

[HKEY_CLASSES_ROOT\ocxfile\Shell\Unregister\Command]
@="regsvr32.exe /u \"%1\""

Note: Always backup the altered registry keys. Due to changes in icons order in Shell.dll between Windows versions, the preselected indices may not display the proper icons for your setup.