Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Editing Registry For Default Browser

Editing Registry For Default Browser

Scheduled Pinned Locked Moved C#
csharpwindows-adminlinuxtutorialquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Abydosgater
    wrote on last edited by
    #1

    This topic is more about the registry then C# itself as i already know how to edit the registry in C#. I have created a basic webbrowser that i have added some personal features to with the .NET WebBrowser control. I want to be able to set this as my default webbrowser that opens urls when clicked say in an msn convo or when put in the "Run" box. I am using the following code to edit the registry: string root = "htmlfile\\shell\\open\\command"; RegistryKey rKey = Registry.ClassesRoot.OpenSubKey(root, true); rKey.SetValue("", Application.ExecutablePath + " %1"); rKey.Close(); And that works fine, It edits the registry to the path for my browser, and it also does the same in HKEY_CURRENT_USER with the same path. But yet still when i click a link or run a url in the run box it opens Firefox. Could someone offer any advice on how to set it to my browser please? Thanks for your time in reading :]

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups