Let windows decide how to open / run the file?

I am saving files (images, Excel documents, Word documents, exe files, bat files, etc.). I need to execute a file from within my program, and the question is, is there a way to allow Windows to handle starting / executing the file? For example, when you double click on a file in Explorer?


source to share

2 answers

Take a look at the Process.Start method :



Note. This will work with any registered file extension like



will open the image with the registered program.



Start a new process with the saved file path name as a parameter:





All Articles