Launch an OS Associated Application from C#

Launching a file in WPF is as easy as off loading the process to the operating system.  The System.Diagnostics.Process namespace contains a Start method that notifies the OS to handle the file with the designated application for that mime type.

string fileLocation = "C:\temp.txt";

System.Diagnostics.
Process.Start(fileLocation);

that's all there is to it.

Published 04-24-2009 4:55 PM by Rob Sondles

Leave a Comment

(required) 
(required) 
(optional)
(required) 
Powered by Community Server (Non-Commercial Edition), by Telligent Systems