0

Hello I'm trying to make app that will open every time when I start pc. And the app will open some links in my browser (firefox). I tried Process.Start("http://www.google.com"); but it says "System.ComponentModel.Win32Exception: The system cannot find the file specified." Do someone know what code should I use to open link in Console application on a default browser?

2 Answers2

1

You could try

string request = "https://www.google.com";
ProcessStartInfo ps = new ProcessStartInfo
{
    FileName = request,
    UseShellExecute = true
};
Process.Start(ps);

You will need to add

using System.Diagnostics;
Xavier
  • 1,383
  • 7
  • 6
0

You will need to Add start at start of you statement.

start https://www.google.com
Alen.Toma
  • 4,684
  • 2
  • 14
  • 31