Hi All,

I need to create one application which can be install on windows platform. After installation it should add custom menu item in windows right click menu. When we click on this custom menu it should do certain things as per my requirement but it is secondary thing.

I dont have any idea about it, so it would be great if any one can give me a hint to start. Any idea how can I achieve this.


Thanks In Advance :)
Shariq

* Run regedit
* go to HKEY_CLASSES_ROOT\*
* right-click on *, new > key
* name the new key "shell"
* right-click on shell, new > key
* name the new key "MyOption"
* right-click on Scite, new > key
* name the new key "Command"
* Click once on Command to select it
* right-click (Default) on right side > Modify
* Add "C:\Program Files\MyApp.exe %1" (Path to exe ahere ever u have stored)to Value Data (don't put the quotes)

[HKEY_CLASSES_ROOT\*\shell\MyApp\Command]
@="c:\\Program Files\\MyApp.exe %1"

Now on most files, you can right-click and see "MyApp" as option, allowing you to open this file MyApp.exe.

now u can search msdn for registry editing and write code for this stuff.Then run ur exe it will add ur option in RCMenu :)

* Run regedit
* go to HKEY_CLASSES_ROOT\*
* right-click on *, new > key
* name the new key "shell"
* right-click on shell, new > key
* name the new key "MyOption"
* right-click on Scite, new > key
* name the new key "Command"
* Click once on Command to select it
* right-click (Default) on right side > Modify
* Add "C:\Program Files\MyApp.exe %1" (Path to exe ahere ever u have stored)to Value Data (don't put the quotes)

[HKEY_CLASSES_ROOT\*\shell\MyApp\Command]
@="c:\\Program Files\\MyApp.exe %1"

Now on most files, you can right-click and see "MyApp" as option, allowing you to open this file MyApp.exe.

Thankx Ashish for your reply,

I want to achieve this by cpp program if it is possible. I also wants to pass some parameters with this.
e.g.
1. If we select files using this than its absolute path
2. If we select folders using this than its absolute path

Just like a custom menu of Notepad++ at some extent. Is it possible with cpp let me know thanks again.

Thanks & Regards,
Shariq

If u want to add option for menu which appears for right clicking on folders then follow these steps

1. Open RegEdit
2. Go to HKEY_CLASSES_ROOT\Folder\shell
3. Add a new Key to the "Shell" Key and name it anything you like.
4. Give it a default value that will appear when you right click a folder, i.e. NewKey (use an "&" without the quotes, in front of any character and it will allow you to use the keyboard)
5. Click on the Key HKEY_CLASSES_ROOT\Folder\shell\NewKey
6. Add a New Key named Command
7. Set the (Default) value of the application you want to run
8. For example: c:\program files\internet explorer\iexplore.exe (Include the full path and parameters if you need them)

This article has been dead for over six months. Start a new discussion instead.