How can I add an entry to the system context menu (when I right-click on a
file). I want a new entry in that context menu that runs my application,
such as packers or virusscanners do it.

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk

Re: installing context mneu handler by David

David
Sat Nov 22 07:19:00 CST 2003

>How can I add an entry to the system context menu (when I right-click on a
>file).

Depending on the complexity of what you want to achieve you can just
add registry entries to the HKEY_CLASSES_ROOT\*\shell\open\command, or
create a context menu shell extension. If you just want to run your
application with the file name as a command line parameter, simple
registry entry additions will be enough.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq

Re: installing context mneu handler by codymanix

codymanix
Sun Nov 23 06:14:32 CST 2003

> >How can I add an entry to the system context menu (when I right-click on
a
> >file).
>
> Depending on the complexity of what you want to achieve you can just
> add registry entries to the HKEY_CLASSES_ROOT\*\shell\open\command, or
> create a context menu shell extension. If you just want to run your
> application with the file name as a command line parameter, simple
> registry entry additions will be enough.


Thank you, David. The thing with the registry worked but now unassigned
filetypes (the ones that haven't a default open command defined) are now
opened by my app by default which was not my intention :-(
Is there a workaround to that?

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk



Re: installing context mneu handler by David

David
Sun Nov 23 17:07:17 CST 2003

>Thank you, David. The thing with the registry worked but now unassigned
>filetypes (the ones that haven't a default open command defined) are now
>opened by my app by default which was not my intention :-(
>Is there a workaround to that?

Try changing the registry key name from "Open" to something else.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq

Re: installing context mneu handler by cody

cody
Sun Nov 23 18:30:10 CST 2003

"David Lowndes" <davidl@mvps.org> schrieb im Newsbeitrag
news:n0e2sv8kc48o1n209kmh2cct957tc3moja@4ax.com...
> >Thank you, David. The thing with the registry worked but now unassigned
> >filetypes (the ones that haven't a default open command defined) are now
> >opened by my app by default which was not my intention :-(
> >Is there a workaround to that?
>
> Try changing the registry key name from "Open" to something else.

No, I didn't used "open" for my key. But nevertheless my shellhandler gets
the default action (double-click on a file), when this file type has no
assigned default action (That means all "unknown" filetypes are now opened
by my application).

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk



Re: installing context mneu handler by David

David
Mon Nov 24 04:09:08 CST 2003

>> Try changing the registry key name from "Open" to something else.
>
>No, I didn't used "open" for my key. But nevertheless my shellhandler gets
>the default action (double-click on a file), when this file type has no
>assigned default action (That means all "unknown" filetypes are now opened
>by my application).

Can you show us the registry branch settings that you have for your
association.

Which OS's have you tried this with? I note that the PSDK
documentation mentions that the first registry key will be the default
for versions of the shell >= 5, but that didn't seem to happen when I
tried it on XP - but I might be doing something subtly different.

There's more in-depth information in the PSDK documentation section
"Creating a File Association" on MSDN.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq

Re: installing context mneu handler by cody

cody
Mon Nov 24 04:16:53 CST 2003

"David Lowndes" <davidl@mvps.org> schrieb im Newsbeitrag
news:uvl3svo6f8jls45uvqrt4jdlhdplf678p5@4ax.com...
> >> Try changing the registry key name from "Open" to something else.
> >
> >No, I didn't used "open" for my key. But nevertheless my shellhandler
gets
> >the default action (double-click on a file), when this file type has no
> >assigned default action (That means all "unknown" filetypes are now
opened
> >by my application).
>
> Can you show us the registry branch settings that you have for your
> association.
>
> Which OS's have you tried this with? I note that the PSDK
> documentation mentions that the first registry key will be the default
> for versions of the shell >= 5, but that didn't seem to happen when I
> tried it on XP - but I might be doing something subtly different.
>
> There's more in-depth information in the PSDK documentation section
> "Creating a File Association" on MSDN.

Thats what I did:

[HKEY_CLASSES_ROOT\*\Shell\FileInfo\command]
@="C:\\programme\\FileSearch\\filesearch.exe -t \"%1\""

I'm using Windows2000/Service Pack 4

--
cody

Freeware Tools, Games and Humour
http://www.deutronium.de.vu
[noncommercial and no fucking ads]