Context Menu (Un)Register OCX and DLL
Posted: 2002-06-01
By: ArchiveBot
Viewed: 173
Filed Under:
No attachments for this post
I'm still new to creating ActiveX DLL. After downloading some DLL plugin samples from Planet-Source-Code i found that some of the codes need to register the DLL manually (that is typing "c:windowssystem
egsvr32.exe DLLFILENAME" in MS-DOS prompt) or an extra EXE is created for that purpose. Why not add an "Register DLL" option into context menu (the menu which pops up when you right click on any dll files with your mouse on right panel of Windows Explorer)?
Original Author: Chin Huat
Code
My ComputerHKEY_CLASSES_ROOTdllfile
(expand the tree with alot of folder icons, from "My Computer", then "HKEY_CLASSES_ROOT" and then "dllfile", by clicking the "+" sign)
C:windowssystem
egsvr32.exe "%1"
Just in case you want to add another option called "Unregister DLL", you can create another key named "Unregister" under "shell" ("Unregister" should be the same level as "Register") and set the "(default)" string value to "Unregister DLL". Under "Unregister", create another key called "command" and set the "(default)" string value to
C:WindowsSystemRegSvr32.Exe /u "%1"
Restart your computer. "Unregister DLL" should be available in context menu. The same trick applies to all file types. Let me know if you still have any problem. Note:
Comments on this post
No comments have been added for this post.
You must be logged in to make a comment.