PDA

View Full Version : Open with command



scoutt
10-13-1999, 04:05 PM
Hi all, I want to add a open with command on the right click menu. I want it to say 'open with notepad'. where at in the registry do I attemp this. thanks in advance.

scoutt

jstolz
10-13-1999, 08:55 PM
You do it in HKEY_CLASSES_ROOT.
1. find the extension you want this to work on (e.g., "*.txt")
2. look at what the default value says (e.g., for "*.txt", it's "txtfile")
3. navigate to that key in HKCR (in our example, "txtfile")--Note, if you're trying to make this work for unassociated file types, go to "HKCR\Unknown"
4. Create a key called "Shell" if necessary (HKCR\txtfile\Shell).
5. Create a key under shell (say, HKCR\txtfile\Shell\Notepad). Be sure not to use the so-called "canonic" verbs that Windows reserves for special use--open, print, printto, openas, etc.
6 Set the default value for that key. This is the text that shows up in the context menu, and if you use an ampersand (&)the letter after will be underlined and "hot". [(Default)="open with &Notepad"]
7 Create another subkey called "command" (HKCR\txtfile\Notepad\command)
8 Set the default value equal to [d][path]filename.ext %1 [(Default)="C:\Windows\Notepad.exe %1"]

The changes take place immediately (well, you may have to hit F5 to refresh)

Regards...

Paul D
10-13-1999, 10:05 PM
Or you could create a shortcut to Notepad and put it in C:\Windows\SendTo. This will add it as an option under Send To

scoutt
10-14-1999, 05:35 AM
thanks

scoutt
10-14-1999, 06:00 AM
well I lied, shame on me. i tried that key and it didn't work. I want to right click on a html file and have the open with notepad there so I don't have to shift-right click. any more suggestions would be helpful.
scoutt