Reputation: 23374
key = Registry.CurrentUser.OpenSubKey(@"Software\Clients\StartMenuInternet", false);
if (key == null)
{
key = Registry.LocalMachine.OpenSubKey(@"Software\Clients\StartMenuInternet", false);
}
On a very few machines this is coming up blank. When regedit is probed, the key is found to be (value not found). What are my options?
Upvotes: 1
Views: 271
Reputation: 23374
I needed
if (key == null || key.ValueCount == 0)
{
key = Registry.LocalMachine.OpenSubKey(@"Software\Clients\StartMenuInternet", false);
}
Upvotes: 0
Reputation: 3380
I'm assuming you want to launch a website in the default browser:
string url = "http://server.com";
Process.Start(url);
will do it.
Upvotes: 4