Friday, April 24, 2009

Windows Registry Keys For Adding Register Dll/OCX Shortcut

Anyone that has ever had to deal with registering dlls knows that it is just plan annoying to have to type "regsvr32.exe" every single time you want to register a dll.  I'm a lazy programmer.  If I have to do something twice, that's once too many.  So I don't have to look all over the internet for the correct registery settings to perform this change, I'm posting it here on my blog.

Paste this text into a new text document, save it with a .reg extension, double click it, and select that "Yes" you "are sure you want to add the information in to the registry".  Done.



@="regsvr32.exe \"%1\""


@="regsvr32.exe /u \"%1\""


@="OCX File"



@="regsvr32.exe \"%1\""


@="regsvr32.exe /u \"%1\""


Philip Marak said...

thats all great and i see the same post all over - now just a small question: what file is gonna registered? is it "OCX file"? now that would be helpfull... thanks!

Daryl said...

All these registry edits do is add a shortcut to the right click menu of .dll and .ocx files within Windows Explorer. So it's going to register whatever file you have selected.