How to determine application to launch

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I determine the correct type of application to launch from a file
extension, in C#?

I would prefer not to have to get a user to find the application executable.
 
using System.Diagnostic;

//.....

ProcessStartInfo psi = new ProcessStartInfo("some document file or url or
whatever");
psi.UseShellExecute = true;
Process.Start(psi);
 
Just do a Process.Start ("file name"). This will open the associated
application.

How can I determine the correct type of application to launch from a file
extension, in C#?

I would prefer not to have to get a user to find the application executable.
 
Back
Top