registry & filetype - adding a single context menu item and /not/ have it as the default one.

2 views
Skip to first unread message

R.Wieser

unread,
Jul 10, 2022, 6:40:00 AMJul 10
to
Hello all,

I've just added an icon for a certain filetype to the registry as well as a
'special action' for in its context menu.

The problem is that this single 'special action' is also regarded as the
default action, meaning it gets executed when double-clicking the file. :-(

Other than adding another context menu entry (like "open", which than
becomes the default one), is there a way to tell Windows to /not/
automatically take my single 'special action' as also being the default one
(adding a special value to the key perhaps) ?

Regards,
Rudy Wieser


Mayayana

unread,
Jul 10, 2022, 8:21:58 AMJul 10
to
"R.Wieser" <add...@not.available> wrote

| Other than adding another context menu entry (like "open", which than
| becomes the default one), is there a way to tell Windows to /not/
| automatically take my single 'special action' as also being the default
one
| (adding a special value to the key perhaps) ?
|
I don't know if this will apply in this case, but I have
numerous Open With subkeys and they show up
alphabetically. So, for example, if I want Notepad, then Firefox,
the IrfanView I might name the key "Open with QFirefox"
and "Open with RIrfanView". (The text for the menu is in the
default value, so the name of the key doesn't matter.)


R.Wieser

unread,
Jul 10, 2022, 9:14:32 AMJul 10
to
Mayayana,

> I don't know if this will apply in this case, but I
> have numerous Open With subkeys and they show up
> alphabetically.

I've got only a single entry (the 'special action'), so sorting isn't a
problem. :-)

What is is that that single entry is automaticaly also made the "double
click on the file" action - which is not what I want.

My "hack of the moment" is having added an "Open" key (which seems to be
placed at the top, regardless of sorting order) - without giving it
"command" key. But that means that I now have *two* entries in the context
menu (bleargh!) - even though the "Open" one just throws a "no program
assocciated" error.

Better than nothing, but not quite what I want.

Regards,
Rudy Wieser


David E. Ross

unread,
Jul 10, 2022, 11:36:02 AMJul 10
to
Is the filetype new, something you created? If so, get FileTypesMan
from Nirsoft at <http://www.nirsoft.net/utils/file_types_manager.html>.
Note that you really should read the entire Web page there before
installing FileTypesMan. Note also that, you can have only one icon for
a filetype.

1. Once you have setup FileTypesMan, launch it.

2. In the list of file extensions in the top half of the window, find
the extension of your special filetype and select it.

3. If Open (or whatever defaut action you want for that filetype) does
not appear in the bottom half of the window, right-click and New Action
from the pull-down context menu. Create a default action (e.g., Open),
being sure to check the checkbox for Default Action.

4. If Default is Yes for your "special action", select that action in
the bottom half of the window, right-click, select Edit Selected Action,
uncheck the checkbox for Default Action, and select the OK button.

--
David E. Ross
"A Message to Those Who Are Not Vaccinated"
See my <http://www.rossde.com/index.html#vaccine>.

R.Wieser

unread,
Jul 10, 2022, 11:57:57 AMJul 10
to
David,

> Is the filetype new, something you created?

Yes. For the purpose of the icon and the single context-menu action.

> If so, get FileTypesMan from Nirsoft

Thank you for that suggestion, but I'm rather old-school and would like to
be able to make those changes manually (with the aid of RegEdit). I'm also
no fanboy of installing random software.

If you have that software installed, could you perhaps make such a change
and check what the changes are ?

Regards,
Rudy Wieser


R.Wieser

unread,
Jul 10, 2022, 12:21:06 PMJul 10
to
My question:

> is there a way to tell Windows to /not/ automatically take my single
> 'special action' as also being the default one

Some more googeling and having been lucky enough to have used the "correct"
combination of search words gave me a page with the answer :

https://docs.microsoft.com/en-us/windows/win32/shell/context-menu-handlers

It mentions how you can select the default item by putting it into the
"(Default)" value of the "Shell" key. My entering an empty string ("")
caused the desired effect.

Simple, but you have to know about it. :-)

Regards,
Rudy Wieser


Mayayana

unread,
Jul 10, 2022, 1:35:49 PMJul 10
to
"R.Wieser" <add...@not.available> wrote

| My "hack of the moment" is having added an "Open" key (which seems to be
| placed at the top, regardless of sorting order) - without giving it
| "command" key. But that means that I now have *two* entries in the
context
| menu (bleargh!) - even though the "Open" one just throws a "no program
| assocciated" error.
|
I don't understand whythis matters. Are you hanging
around the keyboard again? I don't remember EVER using
a default menu item and wouldn't know how to do it.


R.Wieser

unread,
Jul 10, 2022, 2:00:42 PMJul 10
to
Mayayana,

> I don't understand whythis matters.

Than you do not understand why I referred to it as a 'special action' : I do
*not* want it to be activated by accident. Having to right-click and chose
the action from the context menu prohibits that. Having that (currently
single) action made the default for a double-click is the opposite of it.

> Are you hanging around the keyboard again?

It has nothing to do with the keyboard. But yes, my desktop has got a
keyboard attached. Its normally no more than 30 cm infront of me. :-)

> I don't remember EVER using a default menu item

You're using it almost every time you double-click a document.

> and wouldn't know how to do it.

Simples: right-click a document and select the bolded entry. :-p

Regards,
Rudy Wieser



David E. Ross

unread,
Jul 10, 2022, 3:00:02 PMJul 10
to
Yes, I have had FileTypesMan for several years now and have used it
often. Since installing it (and most other Nirsoft applications) merely
involves unzipping a Zip file and moving the results to some folder, I
do not have an archive of installation logs showing when I first started
using FileTypesMan; but the folder containing FileTypesMan -- and only
FileTypesMan -- is more than seven years old. Thus, it is likely I
installed when I had Windows 7 installed in December 2014.

I used FileTypesMan to create the filetype atxt_auto_file with extension
.atxt. That is a plain text file that opens by default with Wordpad
instead of Notepad.

I have used it to change icons for some file types. When I update some
applications, however, they change the icons back to their originals. I
then use FileTypesMan to restore my preferred icons from a folder of
icons that I created.

I also used FileTypesMan to prune context menus for various filetypes.

By the way, before I install any new application or update an existing
application, I scan the installer file with AVG AntiVirus, Malwarebytes,
and Microsoft Security Essesntials after making sure they are all
currently updated. (Only AVG runs continuously on my PC.)

David E. Ross

unread,
Jul 10, 2022, 3:04:26 PMJul 10
to
I avoid making changes in my Windows registry whenever an alternative
(e.g., FileTypesMan) is available. No, I am not concerned about the
risk of corrupting the registry. However, some changes require
additional "housekeeping" changes that might not be readily apparent.
Tools such as FireTypesMan do the necessary "housekeeping".

R.Wieser

unread,
Jul 10, 2022, 4:03:32 PMJul 10
to
David,

> I avoid making changes in my Windows registry whenever an
> alternative (e.g., FileTypesMan) is available.

You mean "making *manual* changes". :-)

It looks like I'm pretty-much your polar opposite : if I can make the
changes myself (manually or by way of some vbscript that I write myself) I'm
not going to install software for it.

As of yet I've still have to make a change which will bring down the OS.
And over the years I've made quite a few of them.

Thanks for the suggestion though.

Regards,
Rudy Wieser

P.s.
I hope you noticed that I found the solution ? Just a single value in an
already existing key.


Mayayana

unread,
Jul 10, 2022, 6:09:26 PMJul 10
to
"R.Wieser" <add...@not.available> wrote

|
| Than you do not understand why I referred to it as a 'special action' : I
do
| *not* want it to be activated by accident. Having to right-click and
chose
| the action from the context menu prohibits that. Having that (currently
| single) action made the default for a double-click is the opposite of it.
|
Ah, I see. Learn something new every day. I just assumed
double-click always meant open. So you want to be able to
double click your new file type and have nothing happen.
Makes sense now. :)


R.Wieser

unread,
Jul 11, 2022, 4:35:24 AMJul 11
to
Mayayana,

> Ah, I see. Learn something new every day. I just
> assumed double-click always meant open.

Pretty-much the same here. Imagine my surprise when I saw my single action
being bolded. :-(

> So you want to be able to double click your new file
> type and have nothing happen. Makes sense now. :)

Yep. :-)

Regards,
Rudy Wieser


Reply all
Reply to author
Forward
0 new messages