This question already has an answer here:
- How can I get the PID of the parent process of my application 4 answers
- How to get parent process in .NET in managed way 6 answers
In C#, is there a way to determine if program has been run from the command line (CMD.exe) or from explorer (any folder view, etc.)? Thanks.