C# ile Varsayılan Tarayıcıyı (Default Browser) Açmak

Aşağıdaki kod registry den bakıp varsayılan tarayıcıyı bulur ve onunla bir url açar

 
RegistryKey registryKey = 
        Registry.ClassesRoot.OpenSubKey(@"htmlfileshellopencommand", false);
 
string defaultBrowserPath = 
        ((string)registryKey.GetValue(null, null)).Split('"')[1];
 
Process.Start(defaultBrowserPath, "http://www.serdarb.com");
  • Facebook
  • Twitter
  • StumbleUpon
  • del.icio.us
  • Digg

Category: Csharp - C# - Comment »


Leave a Reply



Back to top