Is there a way to add a new menu item to the right-click menu of a specific exe file? I know how to add a menu for all exe's, but if its possible, I'd like to add one for just the one program.
:)
Printable View
Is there a way to add a new menu item to the right-click menu of a specific exe file? I know how to add a menu for all exe's, but if its possible, I'd like to add one for just the one program.
:)
* bumpy, bumpy *
:)
* one last time *
:)
What do you mean by Context Menu of Exe? When you right click on a exe file on Windows Explorer??????
U can do this with registry....
there may be a way.. but I have never seen it before...
i know what you mean though... have a context menu that is specific to myapp.exe when you right click on it...
like you said i know how to do it for a file extension.. but not for a specific file
By doing...?Quote:
Originally posted by moinkhan
U can do this with registry....
:rolleyes:
And I'm not really looking for code. The code I can do, I'm really looking for a specific registry key to use.
But it would apply on all exes!!!:p
Actually I tried looking in windows.. i couldn't find any exe having any different item.... so i doubt about this possibility....
Yeah, I figured as much. Perhaps someone can think of a way to accomplish what I am looking for then...
At work we have an client/server app that has the ability to run off of several different servers based on command-line args. What the boss wants is an app that presents a list of the servers, and let the user pick from the list which server to run off of. That is simple enough, but he also doesn't want to have the user have to pick from the list every time. So basically, the last server you pick is the default choice next time around. So I am trying to think of a way to be able to double-click on the program and have it run the default choice, but also have a menu option that brings up the server list. (Which seems like an impossibility)
:)
I could not test that yet... neither received any demo.
http://www.vbforums.com/showthread.p...hreadid=183880
If you can prove it and have a demo available, please... I would love to see it. I don't have that much time to "study" that.
Fill me in on a few details here - this seems like something I have code to do, but no doubt I'm missing something... :p
Are you trying to make a menu option for the .exe that appears before the .exe is run, to start it with some server option? Or after it starts up?
I'm guessing the first, but I'm a little unclear...
I guess he means adding options to the context menu of the file. So you can add, for example, "Open plain" (just made up) which will load your app with the "/p" command so your app knows it does not need to load any saved configuration.... that's just an example.
Yeah, the first one. Just like any old icon on the desktop, but for this particular one, an extra menu that allows the GUI to show up rather than just running with the default option.Quote:
Originally posted by rjlohan
Fill me in on a few details here - this seems like something I have code to do, but no doubt I'm missing something... :p
Are you trying to make a menu option for the .exe that appears before the .exe is run, to start it with some server option? Or after it starts up?
I'm guessing the first, but I'm a little unclear...
:)
McBrain - I'll mess with that tomorrow and I'll let you know if I make any headway. Thanks.
:)
Spot on.Quote:
Originally posted by Mc Brain
I guess he means adding options to the context menu of the file. So you can add, for example, "Open plain" (just made up) which will load your app with the "/p" command so your app knows it does not need to load any saved configuration.... that's just an example.
;)
Maybe you could use shortcuts with either dynamic comandlines in them or just a shortcut for each commandline. Another thought would be to make a new file type and associate it with your app so that the user actually accesses one of these files and it fires your app by association. Just some thoughts I had.
I've implemented both of them, already :D.... but I like the Context menu the most. So, I would like to have it implemented that way as well.Quote:
Originally posted by Edneeis
Maybe you could use shortcuts with either dynamic comandlines in them or just a shortcut for each commandline. Another thought would be to make a new file type and associate it with your app so that the user actually accesses one of these files and it fires your app by association. Just some thoughts I had.
Yeah, I'm keeping the shortcuts with different command lines approach in the back of my mind as a last resort. As it stands, every user has a shortcut for each server, and we're adding them at about one a week, so the idea is to cut it down to one if possible, but I guess two isn't so bad.
:)
I agree the context menu is the ideal solution but couldn't you just give the context menu to your custom file type since all the files can have it. I admit it its a bit ugly but it might not be THAT bad.
Hmm...so many choices. Thank god the words "technological research" appear in my job description. I may need to take a whole tuesday deciding on the best course of action.
:D
For anyone still interested...
http://msdn.microsoft.com/code/defau...mpositedoc.xml
There's a nice example from MSDN. It does only work on file extensions, but you can futz with it to make it work on specific files.
:)
Could you make it work with specific files?
Yup, its sort of a cheesy way, but I found in the code that the name of the files(s) were passed in at some point. And if the filename doesn't match the file I am looking for, I simply didn't add the menu. I forget where in the code it does this off hand, but its commented pretty well.
:)
Can you post an example? I'm too tired to download and think about sth that's for work... I'm off duty until Thursday, so I don't think I would think "that hard" until then about it. ;)
What ever you do, don't ask me to explain what it does in any detail ;).
I tried to make it as obvious as possible which lines I added (there were like 5).
Just follow the instructions in the readme file. I already compiled the tlb's for you.
:)
Thank you... I will have a look at it.
I just dloaded, but didnt want to register the files. Ill try later
Okay, keep us informed.
:rolleyes:
MathImagics's code worked!! You might want to have a look at it