Results 1 to 27 of 27

Thread: [Tip] Register/Unregister DLLs and OCXs easily

  1. #1

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Thumbs up [Tip] Register/Unregister DLLs and OCXs easily

    Instead of having to do a

    Code:
    regsvr32 "c:\whatever\something.dll"
    for each dll you need to register, it's easier to have a "Register/Unregister" option in the right click menu for DLLs.

    Create a reg file, and add the following to it:

    Code:
    REGEDIT4
    
    [HKEY_CLASSES_ROOT\dllfile\Shell]
    @="Register"
    
    [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"
    
    [HKEY_CLASSES_ROOT\.ocx]
    @="ocxfile"
    
    [HKEY_CLASSES_ROOT\ocxfile]
    @="OCX File"
    "EditFlags"=hex:00,00,01,00
    
    [HKEY_CLASSES_ROOT\ocxfile\Shell]
    @="Register"
    
    [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"
    Then, run the .reg file, and the next time you right click a DLL or OCX, the option to register or unregister it should be there. Note that "Register" becomes the default option in the right click menu when you run the .reg file.

    I found this useful, and thought I'd share it with all of you here.
    Attached Files Attached Files

  2. #2
    Lively Member
    Join Date
    Sep 2003
    Location
    USA
    Posts
    102
    Thx this will save lots of time lol.
    ===============
    Tek
    ===============

  3. #3

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Micro$oft should've included this behavior by default, me thinks.

  4. #4
    Fanatic Member JPicasso's Avatar
    Join Date
    Aug 2001
    Location
    Kalamazoo, MI
    Posts
    843
    Who says no good code comes out of Ulaan Baator?
    Merry Christmas

  5. #5
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373
    thanks mendhak... now get back to chit-chat where you belong

  6. #6
    Lively Member satti charvak's Avatar
    Join Date
    Apr 2001
    Location
    noida, india
    Posts
    90

    Wink

    do you have any leg problems......coz all people who have mendhak as nickname do have leg problems......all though thay have excellent ideas to leap around.......

    good help boss for ocx registration..

  7. #7

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Originally posted by JPicasso
    Who says no good code comes out of Ulaan Baator?
    *raises hand*

  8. #8
    Only Slightly Obsessive jemidiah's Avatar
    Join Date
    Apr 2002
    Posts
    2,431
    Are you really from Mongolia then?
    The time you enjoy wasting is not wasted time.
    Bertrand Russell

    <- Remember to rate posts you find helpful.

  9. #9

  10. #10

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Your discretion Martin. If you see it fit to move it there, go ahead.

  11. #11

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Or should I create a copy of this in Code Bank - Other so that some of the members can see this here too?

  12. #12
    Lively Member binduau's Avatar
    Join Date
    Sep 2003
    Location
    Perth Australia
    Posts
    121

    Re: [Tip] Register/Unregister DLLs and OCXs easily

    Awesome Tip



    bindu

    Originally posted by mendhak
    Instead of having to do a

    Code:
    regsvr32 "c:\whatever\something.dll"
    for each dll you need to register, it's easier to have a "Register/Unregister" option in the right click menu for DLLs.

    Create a reg file, and add the following to it:

    Code:
    REGEDIT4
    
    [HKEY_CLASSES_ROOT\dllfile\Shell]
    @="Register"
    
    [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"
    
    [HKEY_CLASSES_ROOT\.ocx]
    @="ocxfile"
    
    [HKEY_CLASSES_ROOT\ocxfile]
    @="OCX File"
    "EditFlags"=hex:00,00,01,00
    
    [HKEY_CLASSES_ROOT\ocxfile\Shell]
    @="Register"
    
    [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"
    Then, run the .reg file, and the next time you right click a DLL or OCX, the option to register or unregister it should be there. Note that "Register" becomes the default option in the right click menu when you run the .reg file.

    I found this useful, and thought I'd share it with all of you here.

  13. #13
    Frenzied Member Spajeoly's Avatar
    Join Date
    Mar 2003
    Location
    Utah
    Posts
    1,068
    What I did was just right click on one > Open With, Select Regsvr32.exe and select to always open this type of file with this program.

    But good tip.

  14. #14
    Addicted Member
    Join Date
    Jan 2002
    Location
    http://www.vbforums.com
    Posts
    164
    Heh... How do I undo this? Just delete all the registry entries?
    "If ignorance is bliss, that probably explain why I'm in a such a mess right now!!"

  15. #15

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Nope. You're stuck with it forever now! Mwahah!! :evil:











































    Yeah, just delete the registry entries.

  16. #16
    Addicted Member
    Join Date
    Jan 2002
    Location
    http://www.vbforums.com
    Posts
    164
    Originally posted by mendhak
    Nope. You're stuck with it forever now! Mwahah!! :evil:











































    Yeah, just delete the registry entries.
    Very funny...hahahha....well...thanks for the great tips, mate!
    "If ignorance is bliss, that probably explain why I'm in a such a mess right now!!"

  17. #17
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373
    too bad theres not a way to only have it show on files that can actually be registered/unregistered instead of all DLLs

  18. #18
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    Originally posted by kleinma
    too bad theres not a way to only have it show on files that can actually be registered/unregistered instead of all DLLs
    That's not really true, its just a lot harder to accomplish.

    http://www.vbforums.com/showthread.p...hreadid=190107
    http://www.vbforums.com/showthread.p...hreadid=242824
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  19. #19

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Whoops.

    Got kicked so hard it duplicated itself.

  20. #20
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    Does it matter where you put this registry key in the registry?

  21. #21
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    On 2k and XP you can put it in
    HKEY_LOCAL_MACHINE/Software/Classes
    so that every user has it, or in
    HKEY_CURRENT_USER/Software/Classes
    so that only you have it.

    But the stuff mendhak posted automatically places itself in
    HKEY_CLASSES_ROOT
    so I don't know which case applies.


    It would be possible to associate this stuff only with DLLs that CAN be registered, I could even write something like it. Question is, do I care?
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  22. #22
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    So i can pop it in anywhere?

  23. #23
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    As mendhak said, put this stuff into a .reg file. It will know where to place itself.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  24. #24
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    Where do you get the .reg files from though? They aint in any of my windows context menu's

  25. #25
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Fire up notepad, copy and paste the code from here and save as a .reg.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  26. #26
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    Cheers dude

  27. #27
    Hyperactive Member csar's Avatar
    Join Date
    Mar 2002
    Location
    Siam
    Posts
    288
    It should have quote sign " around %1 to ignore the error when dll file was stored in directory that had space in name.


    regsvr32.exe %1

    ,should be this

    regsvr32.exe "%1"


    lol
    Don't leave it till tomorrow, Do It Now!
    5361726176757468204368616E63686F747361746869656E

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