close the parent process when hotkey is pressed.


New member
Jul 30, 2018
Programming Experience
[FONT=&quot][FONT=&quot]hello. first of all, sorry for such a newbie question.[/FONT][/FONT]
[FONT=&quot][FONT=&quot]i've made a simple app that will download an exe from a server then execute it as child, the child will close the parent by it's file name if "Esc" key is pressed (regular process kill). is there a way in C# to make that child close the parent regardless of what its name ?.[/FONT][/FONT]
[FONT=&quot]thanks in advanced.:joyous:[/FONT]
In that case, this is not a C# programming question so it is not appropriate for this site. The fact that the application you want closed was written in C# is irrelevant because it's the application doing the closing that needs the code modification.

The one possible exception to that is if you want to modify the child application to accept the process ID of its parent as a commandline argument and then use that to close it, so the name doesn't matter. In that case, you can change the parent application to get its process ID and pass that as an argument when it runs the child. The changes to the child are still not a topic for this site though.
Top Bottom