Sunday, November 23, 2008

In/Uninstall dll/activex using right-click

To in/uninstall dlls/activex by right-clicking on the file, do the following:

1. Create a new file with the extension (.reg).
2. Copy and paste the code below in the file and save it.

REGEDIT4
; ActiveX DLLs
[HKEY_CLASSES_ROOT\.dll]@="dllfile"
[HKEY_CLASSES_ROOT\dllfile\shell\regdll]@="Register ActiveX DLL"
[HKEY_CLASSES_ROOT\dllfile\shell\regdll\command]@="regsvr32.exe \"%L\""
[HKEY_CLASSES_ROOT\dllfile\shell\unregdll]@="Unregister ActiveX DLL"
[HKEY_CLASSES_ROOT\dllfile\shell\unregdll\command]@="regsvr32.exe /u \"%L\""
; ActiveX Controls
[HKEY_CLASSES_ROOT\.ocx]@="ocxfile"
[HKEY_CLASSES_ROOT\ocxfile\shell\regocx]@="Register OCX Control"
[HKEY_CLASSES_ROOT\ocxfile\shell\regocx\command]@="regsvr32.exe \"%L\""
[HKEY_CLASSES_ROOT\ocxfile\shell\unregocx]@="Unregister OCX Control"
[HKEY_CLASSES_ROOT\ocxfile\shell\unregocx\command]@="regsvr32.exe /u \"%L\""
; ActiveX EXEs
[HKEY_CLASSES_ROOT\.exe]@="exefile"
[HKEY_CLASSES_ROOT\exefile\shell\regexe]@="Register ActiveX EXE"
[HKEY_CLASSES_ROOT\exefile\shell\regexe\command]@="\"%L\" /regserver"
[HKEY_CLASSES_ROOT\exefile\shell\unregexe]@="Unregister Active EXE"
[HKEY_CLASSES_ROOT\exefile\shell\unregexe\command]@="\"%L\" /unregserver"

3. Double-click on the file and the message "Are you sure you want to add the information in [path and name of the file you created] to the registry?". Choose "Yes".

4. Complete!.

No comments: