If a user launches my application from a shortcut how do I get the path of the shortcut that was used to execute the application? It's easy enough to get the directory of the application itself. All of the following provide useful information:
However, let's say that my executable is on a share, let's say the path is \\MyServer\D\SharedFolders\MyApplication\MyExe.exe.
Now, let's say the user creates a shortcut in C:\Users\[username]\Documents\My Shortcuts\MyExe - Shortcut
. If the user double clicks the shortcut all of the above will return the UNC path. Is there a way I can get the path of the actual shortcut that was used to launch the executable?