HKLR\Software\Classes\*, default double-click actions, and "open".

R

Robbie Hatley

I posted a message similar to this a few days ago in the "general"

group but go no responses, so I'll try again, this time also posting

to the "registry" group.



I have two questions, really.



Firstly, what exactly is the following key for, and what can folks here

tell me about its uses?



HKEY_LOCAL_MACHINE\Software\Classes\*



I've determined from experiment that Classes\*\Shell\command commands

are added to the right-click context menu of *all* file types, both

known and unknown. But does this key also have other functions?



(It's hard to google for this key, because google apparently interprets

"*" as a wildcard or a punctuation. It work on words, not symbols.)



Secondly, why do I get a boldface "Open" option as the top, default

item in the context menu when I right-click a file icon of unknown

type? This is not the behavior I desire! What I really desire is

to have "Edit in HxD" (where HxD is a type of binary file editor)

as default option when right-clicking or double-clicking a file

icon of unknown type. I put the following in my registry, but

it doesn't quite work the way I want:



HKEY_LOCAL_MACHINE\Software\Classes\*

Shell default = edit_hxd

edit_hxd default = "Edit in HxD"

command default = [path to executable] %1

edit_neo default = "Edit in Neo"

command default = [path to executable] %1

edit_notetab default = "Edit in Notetab"

command default = [path to executable] %1



Desired right-click context menu for file icons of unknown type:



Edit in HxD (boldface)

Edit in Neo (lightface)

Edit in Notetab (lightface)

Scan with Avast (lightface)

Open with... (lightface)

Send To

Cut

Copy

...etc...



*Actual* right-click context menu for file icons of unknown type:



Open (boldface)

Edit in HxD (lightface)

Edit in Neo (lightface)

Edit in Notetab (lightface)

Scan with Avast (lightface)

Open with... (lightface)

Send To

Cut

Copy

...etc...



Where is that "Open" coming from??? If I click it, it brings up

the "Choose Program" box. Double-clicking a file of unknown type

also brings up that box. "Open" is acting as default, even though

I'm telling the registry that I want "Edit in HxD" to be the default.



(I note that "Open" is present in the right-click context menu of

*know* file types, too, but as the sixth item, and not boldface.

Clicking it for known types launches the associated program

instead of the choose box.)



So how do I get rid of "Open"? I'm pretty sure it didn't used to

be there. As I recall, for a while I was able to open unknown-type

files in HxD by just double-clicking them, but a few days ago the

"Open" started popping up, so I can't do that any more.



Thanks in advance to whoever can help me get rid of "Open"!



--

Cheers,

Robbie Hatley

Stanton, CA, USA

perl -le 'print "\154o\156e\167o\154f\100w\145ll\56c\157m"'

perl -le 'print "\150ttp\72//\167ww.\167ell.\143om/~\154onewolf/"'
 
P

Philip Herlihy

"Robbie Hatley" wrote in message

news:qoydnakwz7pKwpjRRVn_vwA@giganews.com...

>

> I posted a message similar to this a few days ago in the "general"

> group but go no responses, so I'll try again, this time also posting

> to the "registry" group.

>

> I have two questions, really.

>

> Firstly, what exactly is the following key for, and what can folks here

> tell me about its uses?

>

> HKEY_LOCAL_MACHINE\Software\Classes\*

>

> I've determined from experiment that Classes\*\Shell\command commands

> are added to the right-click context menu of *all* file types, both

> known and unknown. But does this key also have other functions?

>

> (It's hard to google for this key, because google apparently interprets

> "*" as a wildcard or a punctuation. It work on words, not symbols.)

>

> Secondly, why do I get a boldface "Open" option as the top, default

> item in the context menu when I right-click a file icon of unknown

> type? This is not the behavior I desire! What I really desire is

> to have "Edit in HxD" (where HxD is a type of binary file editor)

> as default option when right-clicking or double-clicking a file

> icon of unknown type. I put the following in my registry, but

> it doesn't quite work the way I want:

>

> HKEY_LOCAL_MACHINE\Software\Classes\*

> Shell default = edit_hxd

> edit_hxd default = "Edit in HxD"

> command default = [path to executable] %1

> edit_neo default = "Edit in Neo"

> command default = [path to executable] %1

> edit_notetab default = "Edit in Notetab"

> command default = [path to executable] %1

>

> Desired right-click context menu for file icons of unknown type:

>

> Edit in HxD (boldface)

> Edit in Neo (lightface)

> Edit in Notetab (lightface)

> Scan with Avast (lightface)

> Open with... (lightface)

> Send To

> Cut

> Copy

> ...etc...

>

> *Actual* right-click context menu for file icons of unknown type:

>

> Open (boldface)

> Edit in HxD (lightface)

> Edit in Neo (lightface)

> Edit in Notetab (lightface)

> Scan with Avast (lightface)

> Open with... (lightface)

> Send To

> Cut

> Copy

> ...etc...

>

> Where is that "Open" coming from??? If I click it, it brings up

> the "Choose Program" box. Double-clicking a file of unknown type

> also brings up that box. "Open" is acting as default, even though

> I'm telling the registry that I want "Edit in HxD" to be the default.

>

> (I note that "Open" is present in the right-click context menu of

> *know* file types, too, but as the sixth item, and not boldface.

> Clicking it for known types launches the associated program

> instead of the choose box.)

>

> So how do I get rid of "Open"? I'm pretty sure it didn't used to

> be there. As I recall, for a while I was able to open unknown-type

> files in HxD by just double-clicking them, but a few days ago the

> "Open" started popping up, so I can't do that any more.

>

> Thanks in advance to whoever can help me get rid of "Open"!

>

> --

> Cheers,

> Robbie Hatley

> Stanton, CA, USA

> perl -le 'print "\154o\156e\167o\154f\100w\145ll\56c\157m"'

> perl -le 'print "\150ttp\72//\167ww.\167ell.\143om/~\154onewolf/"'




If you're the sort of chap that figures out how the registry functions by

guessing at useful edits and then trying them, then I figure do-it-yourself

dentistry will hold no fears (just stay away from me with that drill...)



The way most people would make these changes would be via the GUI in Windows

Explorer (apologies if I'm teaching my granny to suck eggs, but you don't

seem to have mentioned this). In Explorer, pick menus: Tools, Folder

Options, File Types. I've often done this to add a "Command Prompt"

(cmd.exe) context menu item to a Folder, for example. You see a list of

file extensions (e.g .log) and their associated "file type" (in the case of

..log, a "text document") and you can edit the various programs and context

menu items using the Advanced button at the bottom. Note the "Default"

button there - this is what you get if you double-click a file of that type.



Note that it's a three-part process. An extension is associated with a file

type, a file type is associated with an action (one of which is the default

when you double-click) and actions are (always?) associated with an

executable. You can identify the relevant sections in HKEY_CLASSES_ROOT

where you see first the extensions in order, and then the file types. If

you fool around with the .log extension you (probably) won't come to much

harm.



Note also that there are command-line facilities for doing (some of) this:

see:

http://commandwindows.com/assoc.htm

....for details. You may also find:

http://www.informit.com/articles/article.aspx?p=29744&seqNum=8

.... helpful.



HTH



Phil, London
 
Back
Top Bottom