Circuit Negma

C++, C, VB.NET, PCB, Electronics, Circuit Design

Register/Unregister Active X Components from the Context Menu

Posted by Circuit Negma on May 27, 2006

Register/Unregister Active X Components from the Context Menu
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

6 Responses to “Register/Unregister Active X Components from the Context Menu”

  1. 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

  2. fleygn said

    Respect guys. Thanx for such interesting site.y

  3. uxtiwu said

    Hello! very good site. Nice content…

  4. vnoesi said

    Wow! This site is fantastic. It’s professional and to the point. I like it a lot.r

  5. yemkeu said

    Really impressive!! Still better than before with the different sites! Congratulations!

  6. Hjcwtkrq said

    Yes, you can see more about this here:,

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>