TSGL: Default edit program

Ron Brunton rbrunton at accesswave.ca
Sun Jun 14 13:03:11 EDT 2009


Thanks Don,

You brought to the surface one of the challenges that I didn't include in my
initial post. I want to be able to use the context menu "Edit" function
programmatically (using ShellExecute(NULL, "edit", sItem, NULL, NULL,
SW_SHOW) where sItem is a string that contains the file to be edited). In
order for this to work, "edit" must point to the right program. Option 3
seems to be the logical one to take, however I can't find "File Types" as an
option (I'm using Vista. I vaguely recall this as an option in XP and I went
looking for it before posting and couldn't find it. You refreshed my memory
of where to find it, but "there it was - gone!").

I wrote the paragraph above and then looked again at what you had written
and then at the tutorial for "rightmenu" below. What I found in the
HKEY_CLASSES_ROOT was an item called "htmlfile" and expanded this to see
"Shell" as a subkey and below that "Edit" and "Command". Under "Command" I
found the path to Office Word. I replaced that with the path to the program
I want to use and things now seem to work the way I want them to.

This is another example where the specific answer was a result of the
feedback from someone on the list. 

Thanks again Don. Great help!

Ron

-----Original Message-----
From: list-bounces at tsgserver.com [mailto:list-bounces at tsgserver.com] On
Behalf Of Don Penlington
Sent: June-14-09 11:15 AM
To: Tech Support Guy Mailing List
Subject: TSGL: Default edit program

Ron wrote:
>how can I make one of these other programs the default
>choice for the "Edit" option of the context menu in Windows?>>

There are at least 4 ways.

1. If the right click menu shows "open with", then use that, and tick the 
box "Always use this program" when you select the appropriate prog. The 
trouble with using this method is that by associating html files with your 
editor, they won't then open in the browser by default.

If right click does not have this option, then open Word options and 
deselect its default edit association with html.

2. A better option is to put the program of your choice (lets say Editplus 
as an example) directly into the right click menu. This involves and very 
simple and safe registry edit. You'll find the step-by-step instructions on 
my web tutorials at
http://users.tpg.com.au/deepend/rightmenu.html. Even though I originally 
wrote this for W95, it still holds good for all later versions of Windows.

(See also http://users.tpg.com.au/deepend/ext.html and 
http://users.tpg.com.au/deepend/fileextensions.html for other methods.)

Editplus will then appear in the right click context menu.

3. You may be able to set the default edit prog by opening any folder, 
select Tools/Folder Options/File Types and scrolling down to html/edit. You 
can then change the default software.

4. You can set your own file associations for particular subclasses of 
files by renaming the extension to say .ron and then setting a special file 
association just for that file-type. But this is probably not what you want 
in this instance.

No 2 is the best option for setting any context menu items, though it does 
initially involve a little more work to set up in the registry.  For anyone 
not familiar with registry editing, it's a good place to start. If you mess 
up, it won't do any harm---the option just won't work.

Don Penlington


_______________________________________________
Tech Support Guy Mailing List
http://www.tsgserver.com/list/

__________ Information from ESET Smart Security, version of virus signature
database 4153 (20090613) __________

The message was checked by ESET Smart Security.

http://www.eset.com


 

__________ Information from ESET Smart Security, version of virus signature
database 4153 (20090613) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 
 

__________ Information from ESET Smart Security, version of virus signature
database 4153 (20090613) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 




More information about the List mailing list