change app associated with right-click menu "Edit" option

  • Thread starter Thread starter Eric Bragas
  • Start date Start date
E

Eric Bragas

Hi Everybody,

I'm a developer using WinXP, and I find Notepad to be an annoyance, so
I use "EM Editor" to work with .vbs, .sql, .bat, and other text files.
I would like my computer to use EMEDITOR.exe by default whenever I
right-click the icon of one of these file types and choose "Edit" from
the pop-up menu. Unfortunately, windows always defaults to Notepad
when I choose "Edit."

Assuming this is because of data in the registry, what changes do I
need to make to my registry in order to get the machine to default to
emeditor.exe whenever I right-click and choose "Edit" for these file
types? (*.bat, *.sql, *.cmd, *.vbs)

Don't bother warning me -- I'll reformat this b*tch before I admit
defeat, and then probably try it all over again! (I will create a
registry backup, though.)

Thanks for any help,
Eric
 
Right click on each file with extension you want to change, Select Open
With..., chose your application (if it's register in list or use Browse to
locate it), Check Always use this application, then click OK.

This will false All Opens to use your application, whether you want to Edit
or not.

Or you can add an Edit key to each extension in the registry to use your
application.
If you use File Options | File Types, you will notice that the extensions
you gave are not registered in the list. You can add them, then add an Edit
option for each, or just add an Edit key to the registry entry for each file
extension.

1. Open regedit
2. Open HKEY_CLASSES_ROOT\extension (.e.g, .cmd)
3. Look at the default Value in right panel, notice it is set to cmdfile
4. Open HKEY_CLASSES_ROOT\cmdfile (click on '+')
5. You should see (cascading) shell/edit/command
6. Click on the command keyname, then double click on the (Default) name in
the right panel
7. Change the path to the application you want (make sure the %1 is
enclosed in double quotes) and the pathname is enclose in separate double
quotes, e.g.,

"C:\Program Files\My Application's Folder\My Application" "%1"

If the shell/edit/command tree and branches do not exist, you must create
each one.

You must do this for each extension you want to change. Some will exist,
others may not. You can also add an extension manually:

1. Open regedit
2. Open HKEY_CLASSES_ROOT
3. Look and see if your extension is there. Let's assume .sql is not.
4. Right-click on HKEY_CLASSES_ROOT and select New, then Key
5. Enter .sql, then Enter key
6. Double click on (Default) value in right panel. Enter sqlfile, click OK
7. Right Click on HKEY_CLASSES_ROOT and select New, then Key
8. Enter sqlfile, then Enter key
9. Double click on (Default) value in right panel. Enter a description of
what an SQFILE is, then click OK
10. Right click on sqlfile key name, select New, then Key
11. Enter shell, then Enter
12. Right click on shell key name, select New, then Key
13. Enter Edit, then Enter
14. Right click on Edit key name, select New, then Enter
15. Enter command, then Enter
16. Double click on (Default) value in right panel. Enter pathname and %1
(as described above), click OK

Now you've added an Edit command for the .sql extension. Welcome to Windows
Registry 101.
This way does not affect any Open commands on extensions.

You can also do this using the Folder Options | File Types .... New option
(if the extension does not exist).

The above way is faster and shorter, but a little more dangerous (but you
also backup the registry don't you prior to any changes, right)?

The Folder Options | File Types .... New is slower and has error checking as
you are trying to add/change an extension. But you have to understand each
field and how to add commands in the Advanced option.
 
I'm a developer using WinXP, and I find Notepad to be an annoyance, so
I use "EM Editor" to work with .vbs, .sql, .bat, and other text files.
I would like my computer to use EMEDITOR.exe by default whenever I
right-click the icon of one of these file types and choose "Edit" from
the pop-up menu. Unfortunately, windows always defaults to Notepad
when I choose "Edit."

Assuming this is because of data in the registry, what changes do I
need to make to my registry in order to get the machine to default to
emeditor.exe whenever I right-click and choose "Edit" for these file
types? (*.bat, *.sql, *.cmd, *.vbs)
[snip]

While this can be done directly in the registry, it can also be done
through Explorer's GUI - see Menu: Tools / Folder Options / File Types
 
Thank you, Michael, that is exactly what I was trying to do. I didn't
try the registry changes suggested above, and it turns out I didn't
need to.

-Eric
 
Back
Top