I’m attempting a somewhat complex operation on Windows Explorer context menu.
I’ve got an encoding process, which i want to call upon any kind of file.
The idea is to right-click on a file, get the option in the context menu, and select.
This is relatively easy to do :
HKCR "*\shell\encoding" "" "Encode with MyEncoder"
It works.
The encoder produces *.encode extension files.
I want to decode these files using the same mechanism.
This is also quite straightforward :
HKCR ".encode" "" "encoded.file"
HKCR "encoded.file\shell\decode" "" "Decode with MyEncoder"
So now the basic mechanism is in place : Encode any file using context menu, decode these files also using context menu.
Now for the question :
The problem is : “Encode with MyEncoder” option also appears on *.encode file. It seems understandable, since this option has been made available for any file type. However, I don’t want this option to be valid if the file extension is *.encode.
Is that possible to do, and if yes, how ?
You can use Advanced Query Syntax to conditionalize your menu. For example,
AppliesTo=NOT System.FileExtension:=.encode.