Post

 Resources 

Console

Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VBGamer
 VBGamer
 Register and Unregister Context Menu for the lazy
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

DevlinSE
Squire

19 Posts

Posted - Dec 28 2004 :  02:26:40 AM  Show Profile  Click to see DevlinSE's MSN Messenger address  Send DevlinSE a Yahoo! Message  Reply with Quote
The registry script below adds a "Register" and "Unregister" context menus when you right click on a dll or ocx.

Just copy and paste it to a text file with a ".reg" extension and double click to merge with the registry.

;******** start copy below this line *********
REGEDIT4

; This adds the ability to Right-Click on a .dll or .ocx
; and get the Register / UnRegister context menus.

; ==========
; .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 copy above this line *********

I just thought it may prove usefull to others...

Btw, is there a way to tell vb not to register the dll when you compile the project?

Just remember to keep smiling while you're programming or your code won't work. There's no sense in cursing the code...further...
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
VBGamer © Go To Top Of Page
This page was generated in 0.08 seconds. Snitz Forums 2000

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.