Oct 15th, 2003, 06:02 AM
#1
[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
Oct 15th, 2003, 06:10 AM
#2
Lively Member
Thx this will save lots of time lol.
===============
Tek
===============
Oct 15th, 2003, 07:48 AM
#3
Micro$oft should've included this behavior by default, me thinks.
Oct 15th, 2003, 09:25 AM
#4
Fanatic Member
Who says no good code comes out of Ulaan Baator?
Oct 15th, 2003, 09:56 AM
#5
thanks mendhak... now get back to chit-chat where you belong
Oct 15th, 2003, 10:16 AM
#6
Lively Member
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..
Oct 15th, 2003, 10:40 PM
#7
Originally posted by JPicasso
Who says no good code comes out of Ulaan Baator?
*raises hand*
Oct 15th, 2003, 10:54 PM
#8
Are you really from Mongolia then?
The time you enjoy wasting is not wasted time.
Bertrand Russell
<- Remember to rate posts you find helpful.
Oct 15th, 2003, 10:58 PM
#9
mendhak: Would you like me to m ove this thread to the CodeBank?
Oct 15th, 2003, 11:34 PM
#10
Your discretion Martin. If you see it fit to move it there, go ahead.
Oct 15th, 2003, 11:42 PM
#11
Or should I create a copy of this in Code Bank - Other so that some of the members can see this here too?
Oct 16th, 2003, 01:08 AM
#12
Lively Member
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.
Oct 16th, 2003, 01:59 AM
#13
Frenzied Member
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.
Oct 16th, 2003, 04:25 AM
#14
Addicted Member
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!!"
Oct 16th, 2003, 04:28 AM
#15
Nope. You're stuck with it forever now! Mwahah!! :evil:
Yeah, just delete the registry entries.
Oct 16th, 2003, 04:31 AM
#16
Addicted Member
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!!"
Oct 16th, 2003, 09:16 AM
#17
too bad theres not a way to only have it show on files that can actually be registered/unregistered instead of all DLLs
Oct 16th, 2003, 06:26 PM
#18
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
Oct 16th, 2003, 11:17 PM
#19
Whoops.
Got kicked so hard it duplicated itself.
Jan 21st, 2004, 12:02 PM
#20
Supreme User
Does it matter where you put this registry key in the registry?
Jan 26th, 2004, 10:01 AM
#21
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.
Jan 26th, 2004, 12:26 PM
#22
Supreme User
So i can pop it in anywhere?
Jan 26th, 2004, 12:31 PM
#23
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.
Jan 26th, 2004, 12:32 PM
#24
Supreme User
Where do you get the .reg files from though? They aint in any of my windows context menu's
Jan 26th, 2004, 12:54 PM
#25
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.
May 4th, 2004, 08:36 AM
#26
May 21st, 2004, 09:54 PM
#27
Hyperactive Member
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
Forum Rules
Click Here to Expand Forum to Full Width