Register/Unregister Active X Components from the Context Menu
Posted by Circuit Negma on May 27, 2006
| Author: | Greg |
| Category: | Registry |
| Type: | Snippets |
| Difficulty: | Intermediate |
| Version Compatibility: | Visual Basic 5 Visual Basic 6 |
More information: Copy/Paste the below into notepad and save it as “something.reg”. Run it and you’ll be able to registre/unregister ocxs and dlls with the context menu (i.e., by right clicking on the file in windows explorer).
This code has been viewed 47310 times.
Instructions: Copy the declarations and code below and paste directly into your VB project.
_____________________________________________________________________________________________
REGEDIT4
; This adds the ability to Right-Click on a .dll or .ocx
; and get the Register / <b style=”color:black;background-color:#a0ffff”>UnRegister</b> options.
; ==========
; .DLL files
; ==========
[HKEY_CLASSES_ROOT\.dll]
“Content Type”=”application/<b style=”color:black;background-color:#ff9999″>x</b>-msdownload”
@=”dllfile”
[HKEY_CLASSES_ROOT\dllfile]
@=”Application Extension”
[HKEY_CLASSES_ROOT\dllfile\Shell\Register\command]
@=”regsvr32.exe \”%1\”"
[HKEY_CLASSES_ROOT\dllfile\Shell\<b style="color:black;background-color:#a0ffff">UnRegister</b>\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\<b style="color:black;background-color:#a0ffff">UnRegister</b>\command]
@=”regsvr32.exe /u \”%1\”"
; End
Richard Brightwell said
Dude,
Thanks for the .reg stuff. Looks like you’ve got a little markup language embedded in there. I’ll add on my edited version below.
Richard
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
fleygn said
Respect guys. Thanx for such interesting site.y
uxtiwu said
Hello! very good site. Nice content…
vnoesi said
Wow! This site is fantastic. It’s professional and to the point. I like it a lot.r
yemkeu said
Really impressive!! Still better than before with the different sites! Congratulations!
Hjcwtkrq said
Yes, you can see more about this here:,