I am using System.Diagnostics.Process.Start
from a desktop application to start the default browser to visit a link, as below. This is using C# with .NET 4.0 on Windows 8 Pro RTM.
System.Diagnostics.Process.Start(new ProcessStartInfo
{
FileName = @"http://www.google.com",
UseShellExecute = true
});
This works fine under Windows 7, but under Windows 8 I am getting an exception that can be reproduced in LINQPad. The exceptions are:
UseShellExecute = true
gives Win32Exception: Class not registered.
UseShellExecute = false
gives Win32Exception: The system cannot find the file specified.
How can open a URL in the default browser?