process.start always gives an error when looking opening a webpage

30 views Asked by At

This should be dead simple, but I'm pulling my hair out. I simply want to open a web page from within a VB app. Something like this:

Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    Process.Start("https://www.bbc.com/news")
End Sub

But I always get this error: System.ComponentModel.Win32Exception: 'An error occurred trying to start process 'https://www.bbc.com/news' with working directory 'C:\xxx\BangOGram\BangOGram\bin\x64\Release\net6.0-windows'. The system cannot find the file specified.'

From what I can see from searching it appears to be an issue with the working directory but since I'm accessing a web browser that's universally available via the path I don't understand why.

I've tried setting the app to only work on x64 processor.

PS. Also tried:

Process.Start("chrome.exe","google.com")
0

There are 0 answers