Image of Navigational Map linked to Home / Contents / Search A Little Registry Hacking for HTML Editors

Ross Mack - GUI Online Productions
Image of Line Break

There is a cool way (that I found by mistake) to add some features to your environment to make dealing with HTML files easier.

All you need to do is this:

  1. Open up regedit and go to HKEY_CLASSES_ROOT\htmlfile. This is the section that both html and htm files are associated with. Then open up the shell subkey where you will find the open subkey. OK, that's what tells Win95 how to deal with such files - specifically, how to open them. What we want to do is add an additional association for editing them.
  2. Select the shell subkey and right click in the right hand pane selecting new|key. This will create a new key at the same level as open. Rename the key 'edit'. Then double click your new edit subkey to open it up and add ANOTHER subkey called 'command'. Once you have done that, you need to select the command subkey and double click on its {default} entry in the right hand pane. This will open an editing window that will allow you to enter a value. You should enter here the path and filename of your favourite text or html editor followed by %1. For example mine says: "C:\Program Files\Textpad\txtpad32.exe" %1
  3. Then save that change. You can test that everything has worked by finding a html file somewhere on your hard disk and right clicking on it. If 'edit' is an option in the popup menu everything is cool and if you select that option the file should appear in your favourite editor. Internet Explorer users will also notice a new edit button on the right hand side of their tool bar which opens the currently viewed file in thier selected editor. A 'current page' option should now also be available on the Edit menu of IE which does the same thing.

In fact, you can also add other such entries to add additional popup menu items for any file type. As I typically use Internet Explorer, I have also added an item to the popup menu which allows me to launch any selected html file with Netscape. This is done in just the same way, the key is called Netscape instead of edit and the command line is, of course, different but it's all the same process. In fact you can make these sorts of additions to any file associations in your registry that you wish to change. Now remember, hacking your registry can be dangerous so take backups - or don't do it at all if you aren't feeling confidant to fix any problems you may cause.

For those who are interested, you can download a zip file called (84 KB), containing a small executable created using the inimitable WISE 5 that will make this registry change for you. The zip file also includes the WISE script itself so you can see how easily such things can be done in WISE (it's only 5 lines long!).

Go wide.

Written by: Ross Mack
December '96

Image of Arrow linked to Next Article
Image of Line Break