954,500 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Run program when separate program is executed

Hey all,

Is it possible in C# to make it so that when a program is run, your program opens up with it? For example, say I went to double click the "Firefox" icon, would it be possible to have my program also open up with it? Basically what I want is to link my program with the execution of another.

Would I have to edit registry keys? Any ideas would be greatly appreciated!

Thank you all.

r3drock3t88
Newbie Poster
5 posts since Jan 2010
Reputation Points: 10
Solved Threads: 0
 

Can you be more specific about your problem, i mean which application you want to open with another application.......?

avirag
Posting Whiz
313 posts since Jun 2009
Reputation Points: 31
Solved Threads: 36
 

Thanks for the response.

I basically want to be able to "link" (would be an appropriate word) two programs together. One program being mine (C# coded), and the other being ANY program that I may start. It really does not matter which program it is, I am just curious if this is possible.

So to sum it up, I want my program to startup when I open another program, that program being determined by me.

r3drock3t88
Newbie Poster
5 posts since Jan 2010
Reputation Points: 10
Solved Threads: 0
 

Install a service and watch for new processes starting up. Unfortunately the behavior you're describing is commonly used by spyware/malware programs so this will probably set off antivirus apps if you try to natively "link" the programs in the registry, but it is possible (and i wont answer any questions regarding how they do it). Is this a plugin to other applications?

sknake
Industrious Poster
4,954 posts since Feb 2009
Reputation Points: 1,764
Solved Threads: 735
 

Yikes,

I am not making any form of virus, but I can see what you are getting at. It is not a plugin to anything else, I would just like to be able to accomplish starting my program with the program of my choice, for whatever reason there may be. I think it would be a very cool little feature to have. One could think of it in the ways of being a "plugin", but not based off one single program, but ANY program I was to tell mine to look for.

Thanks for your reply and time.

r3drock3t88
Newbie Poster
5 posts since Jan 2010
Reputation Points: 10
Solved Threads: 0
 

Well I would use a service and have it monitor for processes. Take a look at virus removal instructions to figure out how you can make your program execute with others:
http://www.bleepingcomputer.com/virus-removal/uninstall-antivirus-2009
http://www.spywareremove.com/removeAntivirus2009.html

Google around for cleaning instructions from the most popular virii and you'll have your answer

sknake
Industrious Poster
4,954 posts since Feb 2009
Reputation Points: 1,764
Solved Threads: 735
 

Thank you for your responses, it's been awhile since I had a chance to check back. I am very new to services, infact, extremely new. Would you by chance be able to point me in the right direction as to where I can get started? I did a google search but haven't found anything worth while. Nothing really that was helpful.

Thanks for all your help.

r3drock3t88
Newbie Poster
5 posts since Jan 2010
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: