Adding a right click option from within a folder

G

Guest

I have a console program, called create_project.exe, which takes user
input, and then generates a bunch of files based on their input.

Currently, I changed I have altered the right-click menu for "Folder", and
added the option to run this program. But if I right-click within this
folder, the option does not appear.

How can I make this item appear, when right clicking within the folder?

Thanks,
~S
 
G

Guest

Wesley Vogel said:
Manage the context-menu entries for folders, drives and Namespace objects
http://windowsxp.mvps.org/context_folders.htm

This doesn't really tell me anything other than where to find the entries,
in case I want to delete them. The values in
HKCR\Folder\shellex\ContextMenuHandlers all have a REG_SZ value with some
funny looking alpha-numeric string, almost like a product key.

As I mentioned before, I did add an entry to HKCR\Folder\shell\New
Project\command, with the value pointing to my create_project.exe. This
option shows up when I click on a folder. But when I click in a folder, I
don't get that option. I want the option when I click in a folder.
 
R

Ramesh, MS-MVP

I want the option when I click in a folder.

Sam,

What do you mean by "click in a folder"? In order for the menu to appear
when you right-click a blank area in an open folder, you need to write a
shell extension. Ordinary menu (static menus) don't show up there.

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com




Wesley Vogel said:
Manage the context-menu entries for folders, drives and Namespace objects
http://windowsxp.mvps.org/context_folders.htm

This doesn't really tell me anything other than where to find the entries,
in case I want to delete them. The values in
HKCR\Folder\shellex\ContextMenuHandlers all have a REG_SZ value with some
funny looking alpha-numeric string, almost like a product key.

As I mentioned before, I did add an entry to HKCR\Folder\shell\New
Project\command, with the value pointing to my create_project.exe. This
option shows up when I click on a folder. But when I click in a folder, I
don't get that option. I want the option when I click in a folder.
 
G

Guest

Ramesh said:
Sam,

What do you mean by "click in a folder"? In order for the menu to appear
when you right-click a blank area in an open folder, you need to write a
shell extension. Ordinary menu (static menus) don't show up there.

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com

Correct, I mean clicking in the blank area of a folder.

I wonder if it would be easier to use the New submenu. But my research on
the 'File->New' menu, is that it just copies a template file, into the
folder.

I need it to copy 3 files. Then prompt the user for input, then alter the
three files. Would this be possible through the 'File->New' menu?

If I need to write a shell-extension, then I'll probably just live with
clicking on the actual folder.

Thanks,

~S
 
R

Ramesh, MS-MVP

Using the "Template" method, only one file will be created. However the
shellnew supports another method, which executes an application.

Command - Executes an application. This is a REG_SZ value specifying the
path of the application to be executed. For example, you could set it to
launch a wizard.

- - -
Reference: Extending Shortcut Menus:
http://msdn.microsoft.com/library/d...ell_basics/shell_basics_extending/context.asp
- - -

Again, you'll need to write a program.

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com
 
S

Shea Martin

Ramesh said:
Using the "Template" method, only one file will be created. However the
shellnew supports another method, which executes an application.

Command - Executes an application. This is a REG_SZ value specifying the
path of the application to be executed. For example, you could set it to
launch a wizard.

- - -
Reference: Extending Shortcut Menus:
http://msdn.microsoft.com/library/d...ell_basics/shell_basics_extending/context.asp
- - -

Again, you'll need to write a program.
This is exactly what I wanted to do. I already made the program, I just
couldn't figure out how to associate it with the File->New option (other
than the template method). Works like a charm, thanks.

~S
 
R

Ramesh, MS-MVP

You're welcome Shea.

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


Ramesh said:
Using the "Template" method, only one file will be created. However the
shellnew supports another method, which executes an application.

Command - Executes an application. This is a REG_SZ value specifying the
path of the application to be executed. For example, you could set it to
launch a wizard.

- - -
Reference: Extending Shortcut Menus:
http://msdn.microsoft.com/library/d...ell_basics/shell_basics_extending/context.asp
- - -

Again, you'll need to write a program.
This is exactly what I wanted to do. I already made the program, I just
couldn't figure out how to associate it with the File->New option (other
than the template method). Works like a charm, thanks.

~S
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top