Lets say that I have an executable and when it is started I want to know how it\'s started. I.e. I would like to know if it is started with a shortcut or directly. With this:
This won't work in general, but if you are creating the shortcut, you could add a command line parameter to identify it.