Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Detect what process/program start my process/program

Tags:

c++

c#

.net

vb6

Is there a way in code to detect what process or application starts my process or application. Any .net, vb6 or c++ code snips would be great


1 Answers

In .Net,

Assembly.GetEntryAssembly() 

returns the assembly that the current running assembly process was kicked off from. But if you have more than one process running, I don't believe there is any way to determine which one was the first one to start up...

to get the version of the entry assembly,

 Assembly.GetEntryAssembly().GetName().Version
like image 161
Charles Bretana Avatar answered May 25 '26 00:05

Charles Bretana



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!