Is it possible to use Process.Start to open a file with a program other that the default program?
For instance, like
Process.Start("C:\file.txt");
, but opening it in word instead of notepad
Is it possible to use Process.Start to open a file with a program other that the default program?
For instance, like
Process.Start("C:\file.txt");
, but opening it in word instead of notepad
Yes, you can but it should be registered
Process p = new Process();
p.StartInfo.FileName = "notepad.exe"; // or "WINWORD.exe";
p.StartInfo.Arguments = "C:\\file.txt";
p.Start();
Ah thanks
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.