I’m working on a project where I need to determine the specific shortcut that was used to open the cmd.exe process that is currently running my program. I am not sure where to start with this and would like to know if it is even possible to achieve this API-wise.
I’ve looked into using the GetStartupInfo() function from the Windows API and then examined the RTL_USER_PROCESS_PARAMETERS structure. This method provides information about the startup parameters of a process, but it only works for the current program itself, not for other processes. I’m also raising the question of whether it is possible to find the cmd.exe process that was used to run my program, perhaps by it’s handle.