Why does it matter? You can call the win32 ShellExecute() or C# Process.Start() with parameters the same way you can on the command line or from the run dialog box. It just fires up the installer... Read More
what i try to understand is the users interaction with the program. let say you have something.exe, i want to understand if the user clicks on this file with the mouse or runs it using command prompt typing the name of the executable and some parameters.
But you can create a shortcut with parameters, use the run with parameters, etc etc. Its all just starting a process. What impact does the source of execution potentially have on your application? ie if they opened the application from DOS instead of Explorer you would do __ instead of ___ ?
it is a long story but let say you want to get some statistics about user conventions and want to know how many people run notepad by double clicking notepad.exe or typing notepad in the run prompt in start menu or opening cmd and typing notepad. all runs the same notepad.exe via different ways. tell me how would you gather statistics for that?
As far as if someone navigates to C:\Progra~1\App\AppName.exe or executes it from DOS .. I don't believe you would be able to tell. Aside from developers I bet 99% of applications are started by start menu or desktop icons. I guess you could scan running processes if no parameters are found to see if they have cmd.exe, dos*.exe, command.com, etc running but then you wouldn't know if they navigated to it with the run dialog box, double clicked by manual navigation in internet explorer, or did "File -- Open" in notepad.exe, change the filter to *.exe, right clicked on a file, and selected run.
You can invoke a new process 999999 different ways so i'm afraid it is impossible to tell