How would one go about adding a submenu item to the windows explorer context menu (like for example 7-Zip does) for a Java application?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I am aware of two ways to do it. The fancy way is to write a windows shell extension, which is how powerarchiver, winzip etc do it I believe (this involves running code to determine what the context menu items will be dependent on the file chosen).
The simple way, for simple functionality, is you can add an entry in the registry :
Where
<file type>is the files that this context menu should apply to i.e. *, .mdb, .docand
<display text>what you want to show in the context menu.Then add the default string as a path to the application you want to launch from the context menu, and you can use %1 to refer to the currently selected file i.e. for MS Access I use :
This then adds a context menu item for any file I select (hence the *), which allows me to launch it in MS Access 2000.
Of course, always back up your registry before hacking it.
Your program could do this during install, or on first run.