03-13-2001, 02:16 PM
|
#1
|
|
SQL nutcase
Join Date: Sep 2000
Location: Belgium
Posts: 1,136
|
If you are tired to use regsvr32.exe to register and unregister a dll, you can paste the following code in a .reg file and merge it in the registry. It gives you a register and unregister option in the popup menu of a dll file.
Code:
REGEDIT4
[HKEY_CLASSES_ROOT\dllfile\shell\Register...\Command]
@="\"regsvr32.exe\" \"%1\""
[HKEY_CLASSES_ROOT\dllfile\shell\UnRegister...\Command]
@="\"regsvr32.exe /u\" \"%1\""
I'll explain how this works.
If you open regedit (or regedt32) and check under the HKEY_CLASSES_ROOT key you will see a long list of keys with the name of file types. Those are all the file types that are known on your machine. If click on for example the ".bmp" key, you can see that the default value has the string "Paint.Picture" in it. This "paint.picture" refers to the name of your file type. If you do a find on "Paint.Picture" under HKEY_CLASSES_ROOT you will find a key with some subkeys under it. (CLSID, DefaultIcon, Insertable, protocol, shell) It's the shell key we are interested in. The subkeys under the shell key represent the menu items you can see when you right click on a .bmp file in the windows explorer. So if you want to add a menu item to the windows explorer, you can create a subkey under shell, and create a "command" subkey under it with as default value the command it has to execute when you click on the menu item.
|
|
|