If wanting to detect if your program was started by commandline, or shelled from a program, or from a shortcut, or other, I am fairly sure you can not detect that from your exe.
I tried each of those while watching "SysInternals - Process Explorer" and all copies appeared under "Explorer.exe" (All with the exception of "ShellExecute" which the program appeared under its own process
I tried each of those while watching "SysInternals - Process Explorer" and all copies appeared under "Explorer.exe" (All with the exception of "ShellExecute" which the program appeared under its own process
Comment