I'm making a text editor and I'm trying to make a code to get the file path of a file when it's open in a application using 'Open With'.
Details: 'Open With' is an option when you right click on a file. The file then becomes a shortcut to the application. I have tried to use Process
, but I couldn't seem to get the path from a file process.
Question: In c#, how do you get the file path of a file when using 'Open With'?
EDIT: Application path is C:\Users\Mayhem\Documents
Text file path is C:\Users\Mayhem\Desktop
I need to get the file path of 'text file'.