Results 1 to 15 of 15

Thread: Right-click "Register" option for ocx's and dll's

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2000
    Location
    Bellevue, WA, USA
    Posts
    1,357

    Unhappy

    Does anyone know how you add the "Register" option to the popup menu that appears when you right-click on a .dll or .ocx file?

    My computer at work has it, but not at home. Couldn't find the option to add it in TweakUI, either.

    I'm running Windows 2000 (SP1).

    Thanks in advance!!!
    ~seaweed

  2. #2
    Hyperactive Member D12Bit's Avatar
    Join Date
    Oct 2000
    Location
    Guatemala
    Posts
    373

    Lightbulb

    Hi,
    I canīt tell you how to do it in Windows2000 (SP1) because i havenīt used it, but in Windows98 what i did was to create a shortcut to \windows\system\regsvr32.exe in the folder \windows\SendTo\ and after that just right click in the .ocx or .dll file and in the submenu of Send To... in the popupmenu choose Shortcut (or whatever you named it) to Regsvr.exe and voila! your file is registered.

    Saludos...
    "Who Dares Wins" - "Quien se Arriesga Gana"
    Mail me at:

  3. #3
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Shell regsvr32 from context menu, that's a cool idea, well heres what you can do:
    Open regedit and create this key, .dll should be already there, just create the whole path:

    HKEY_CLASSES_ROOT\.dll\shell\Register\command

    and change it's default value to:

    regsvr32 /s %1

    then again create this key for unregister command:

    HKEY_CLASSES_ROOT\.dll\shell\UnRegister\command

    and set it's default value to

    regsvr32 /s /u %1

    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  4. #4
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    BTw, if you want to do the same for OCX's just find the .ocx key in Classes root and do the same with it
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2000
    Location
    Bellevue, WA, USA
    Posts
    1,357

    Talking Thanks, guys

    I like your idea, kedaman. I think I will do it for both ocx's and dll's.

    I like your idea, too, D12Bit, but kedaman's is one less step in menu navigation and incorporates switches so I can register or unregister the components.

    One question, k-man: Why do you use the "/s" switch? Doesn't that prevent messages from being presented to you if it succeeds or fails? Personally, I would like to know the result of the registration attempt.

    [Edited by seaweed on 10-29-2000 at 11:24 PM]
    ~seaweed

  6. #6

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2000
    Location
    Bellevue, WA, USA
    Posts
    1,357

    Unhappy not working

    I tried your suggestion k-man, but the option doesn't show up in the popup menu when i right click a .dll file. Any ideas? Does it work on your machine?

    Thanks again,
    ~seaweed

  7. #7
    Hyperactive Member D12Bit's Avatar
    Join Date
    Oct 2000
    Location
    Guatemala
    Posts
    373

    Lightbulb kedaman is right!

    Okay,

    in honor to kedaman i wrote this,

    Code:
    REGEDIT4
    
    [HKEY_CLASSES_ROOT\.ocx\shell\Register\command]
    @="regsvr32 /s %1"
    [HKEY_CLASSES_ROOT\.ocx\shell\UnRegister\command]
    @="regsvr32 /s /u %1"
    
    [HKEY_CLASSES_ROOT\Dllfile\shell\Register\command]
    @="regsvr32 /s %1"
    [HKEY_CLASSES_ROOT\Dllfile\shell\UnRegister\command]
    @="regsvr32 /s /u %1"
    Just copy and paste in a new Notepad Document and save it like RegDllOcx.reg and then just doubleclick on it and it will automatically update your Registry if you donīt like to open it with regedit.exe or if you like to share it with someone else just email it

    My respects to kedaman...

    Saludos...


    p.s.

    There was a little mistake (no big deal after all) in the keys that you have to edit in the registry,

    the incorrect keys for .dll files is:
    [HKEY_CLASSES_ROOT\.dll\shell\Register\command]
    [HKEY_CLASSES_ROOT\.dll\shell\UnRegister\command]

    the correct ones are:
    [HKEY_CLASSES_ROOT\Dllfile\shell\Register\command]
    [HKEY_CLASSES_ROOT\Dllfile\shell\UnRegister\command]

    up there the code itīs fixed, just copy and paste in a .reg file

    Saludos...

    [Edited by D12Bit on 10-30-2000 at 12:28 AM]
    "Who Dares Wins" - "Quien se Arriesga Gana"
    Mail me at:

  8. #8
    Hyperactive Member D12Bit's Avatar
    Join Date
    Oct 2000
    Location
    Guatemala
    Posts
    373

    Unhappy Just finished checking

    Just realize that it worked ok with .ocx files but not with .dll files, ther most be somthing else that a .dll file needs...

    Saludos...

    p.s.
    DONīT MIND THIS ONE

    check my review in my post about .reg file
    itīs all fixed for .dll files and .ocx files

    Saludos...

    [Edited by D12Bit on 10-30-2000 at 12:30 AM]
    "Who Dares Wins" - "Quien se Arriesga Gana"
    Mail me at:

  9. #9
    Hyperactive Member D12Bit's Avatar
    Join Date
    Oct 2000
    Location
    Guatemala
    Posts
    373

    Exclamation Check This out!

    Hey seaweed,

    check this corrections and tell me about it


    Saludos...
    "Who Dares Wins" - "Quien se Arriesga Gana"
    Mail me at:

  10. #10

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2000
    Location
    Bellevue, WA, USA
    Posts
    1,357

    Unhappy Thanks for your help guys, but...

    Must be a Win2K thing, but the registry setting thing isn't working for .dll's or .ocx's on my machine. Thanks for your help, though!!!
    ~seaweed

  11. #11
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221

    Thumbs up

    hey, I think i removed the default value of

    HKEY_CLASSES_ROOT\.dll

    to make it work, then i forgot to post it (argh, why did i do that?) It's "Dllfile" right?

    Anyway whatever registry you have, check up the default value of the .dll or .ocx key and find that key named for instance "Dllfile" and the the commands for that key intead Thanks D12bit for noticing me

    /s yeah, silent mode and doesn't show any stupid messages

    [Edited by kedaman on 10-30-2000 at 04:54 AM]
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  12. #12
    Guest
    Here's a full version that provides register/unregister functions for DLL's and OCX's. It works for 95, 98, NT and 2000. There is also a bit at the top that you can remove that includes opening ANY file in either Notepad or Wordpad.

    The Register/Unregister only shows if the file is a DLL or an OCX

    Code:
    REGEDIT4
    
    ;notepad and wordpad stuff for all files
    [HKEY_CLASSES_ROOT\*\Shell]
    
    [HKEY_CLASSES_ROOT\*\Shell\Notepad]
    @="&Notepad"
    
    [HKEY_CLASSES_ROOT\*\Shell\Notepad\Command]
    @="Notepad \"%1\""
    
    [HKEY_CLASSES_ROOT\*\Shell\Wordpad]
    @="&Wordpad"
    
    [HKEY_CLASSES_ROOT\*\Shell\Wordpad\Command]
    @="\"c:\\program files\\windows nt\\accessories\\wordpad.exe\" \"%1\""
    
    
    ;-----------------------------------------------
    ;let the computer know that an ocx is an ocxfile
    [HKEY_CLASSES_ROOT\.ocx]
    @="ocxfile"
    
    
    ;---------------------------------
    ;register and unregister for dll's
    
    [HKEY_CLASSES_ROOT\dllfile\Shell]
    
    [HKEY_CLASSES_ROOT\dllfile\Shell\Register]
    
    [HKEY_CLASSES_ROOT\dllfile\Shell\Register\command]
    @="regsvr32.exe \"%1\""
    
    [HKEY_CLASSES_ROOT\dllfile\Shell\UnRegister]
    
    [HKEY_CLASSES_ROOT\dllfile\Shell\UnRegister\command]
    @="regsvr32.exe /u \"%1\""
    
    ;---------------------------------
    ;register and unregister for ocx's
    
    [HKEY_CLASSES_ROOT\ocxfile\Shell]
    
    [HKEY_CLASSES_ROOT\ocxfile\Shell\Register]
    
    [HKEY_CLASSES_ROOT\ocxfile\Shell\Register\command]
    @="regsvr32.exe \"%1\""
    
    [HKEY_CLASSES_ROOT\ocxfile\Shell\UnRegister]
    
    [HKEY_CLASSES_ROOT\ocxfile\Shell\UnRegister\command]
    @="regsvr32.exe /u \"%1\""
    ;---------------------------------
    ;register and unregister for exe's
    
    [HKEY_CLASSES_ROOT\exefile\Shell]
    
    [HKEY_CLASSES_ROOT\exefile\Shell\Register]
    
    [HKEY_CLASSES_ROOT\exefile\Shell\Register\command]
    @="regsvr32.exe \"%1\""
    
    [HKEY_CLASSES_ROOT\exefile\Shell\UnRegister]
    
    [HKEY_CLASSES_ROOT\exefile\Shell\UnRegister\command]
    @="regsvr32.exe /u \"%1\""
    This is probably one of the most useful thing a programmer can have in their toolbox

    Whack it all into a file called OCXDLL.reg, then merge the file into the registry

    It's not silent, simply because I like to know if the register failed (as it will if it has dependencies, or if it is not a DLL that requires registration. T make it silent, add the /s switch

    Cheers

    - gaffa

  13. #13

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2000
    Location
    Bellevue, WA, USA
    Posts
    1,357

    Thanks again

    I will try this stuff when I get home tonight. Thanks for all the help. This is a cool feature for all developers.
    ~seaweed

  14. #14
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Looks good, i'll try merging that piece, gaffa
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  15. #15
    Guest
    m

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width