how to find default browser in registry windows 7

19
2014-04
  • DevT

    i need to find my default browser so first i try to figure it through regedit (registy keys) http://stackoverflow.com/questions/968449/how-do-i-change-default-browser-using-c-sharp-or-batch-file as mentioned i used reg key{HKEY_LOCAL_MACHINE\SOFTWARE\Classes\http\shell\open\command} then i manual change my web browser from internet explore to chrome. but after i refresh values does not change in reg key. why this happen??? how can i detect my default browser in reg key?

    EDIT :

    always

    HKEY_LOCAL_MACHINE\SOFTWARE\Classes\http\shell\open\command 
    

    value is

    "C:\Program Files (x86)\Internet Explorer\iexplore.exe" -nohome 
    

    (even i change to chrome to default browser this does not change)

  • Answers
  • slm

    You can look under this registry key and find out which browser is being used by the current user:

    HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice\Progid
    

    It is a REG_SZ value and will be one of these for the major three browsers currently available:

    • FirefoxURL
    • ChromeHTML
    • IE.HTTP

  • Related Question

    How to edit registry from Vista recovery tool?
  • Ian Boyd

    How can i edit the registry from the Windows Vista recovery tool?

    The recovery tool provides 5 options:

    • Startup Repair
    • System Restore
    • Windows Complete PC Restore
    • Windows Memory Diagnostic Tool
    • Command Prompt

    i can click Command Prompt, from where i can type:

    X:\Sources>regedit
    

    And RegEdit appears. But it is editing the registry of the mini-Windows environment that is running the recovery tool - it's not my registry.

    i need to edit

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\MUI\UILanguages\xx-YY

    and change it to

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\MUI\UILanguages\en-US


    What i tried

    i tried creating a dummy key:

    HKCU\Software\TempTestFoo
    

    and then using File -> Import to import the registry hive file:

    C:\WINDOWS\system32\config\system
    

    and it does, it brings in every key, except CurrentControlSet:

    \CurrentControlSet001
    \CurrentControlSet002
    \CurrentControlSet003
    \LastKnownGoodRecovery
    \MountedDevices
    \Select
    \Setup
    \WPA
    

  • Related Answers
  • Kez

    The quick answer, you're pretty much there. Check value of Current in the key HKEY_LOCAL_MACHINE\SYSTEM\Select. This will tell you which of the CurrentControlSet00X's you need to make your change in.

    For example, if Current is set to 2, you need to edit HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet002 with your changes.

    The way it works is this:

    Windows always keeps a few copies of this key, suffixed 001 to 003 (only 2 in Windows 7 I think?). CurrentControlSet001, CurrentControlSet002 and CurrentControlSet003. Think of them as the master keys that are persistent while the computer is switched off.

    When you log into Windows, it picks the last used key, using the value of Current in the HKEY_LOCAL_MACHINE\SYSTEM\Select key. The content is copied into a key called HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet. This key is what Windows plays with while you are logged on.

    When you log off of Windows, changes are written back to the key that was original copied from when you first logged on. CurrentControlSet002 for example. CurrentControlSet vanishes, so to speak. This is why you are unable to see it while you are logged off, working from the recovery console :-)

    Probably a bit over the top with my answer (I blame the Red Bull), but I figured I'd answer a detailed question with a detailed answer.