开发,使用COM组件时经常需要注册,反注册OCX或DLL文件。将下面START和END之间的内容保存到文本文件中,并将其扩展名改为.REG 然后导入注册表。
================START============================
REGEDIT4
; This adds the ability to Right-Click on a .dll or .ocx
; and get the Register / UnRegister options.
; ==========
; .DLL files
; ==========
[HKEY_CLASSES_ROOT/.dll]
"Content Type"="application/x-msdownload"
@="dllfile"
[HKEY_CLASSES_ROOT/dllfile]
@="Application Extension"
[HKEY_CLASSES_ROOT/dllfile/Shell/Register/command]
@="regsvr32.exe /"%1/""
[HKEY_CLASSES_ROOT/dllfile/Shell/UnRegister/command]
@="regsvr32.exe /u /"%1/""
; ==========
; .OCX files
; ==========
[HKEY_CLASSES_ROOT/.ocx]
@="ocxfile"
[HKEY_CLASSES_ROOT/ocxfile]
@="OCX"
[HKEY_CLASSES_ROOT/ocxfile/Shell/Register/command]
@="regsvr32.exe /"%1/""
[HKEY_CLASSES_ROOT/ocxfile/Shell/UnRegister/command]
@="regsvr32.exe /u /"%1/""
; End
================END==============================