What is the Default Browser of Client's computer in windows?

1

Is there a way to find what is the default browser on a client's windows machine?

Is there a registry key or some other property that can help to find what is their default browser?

Imsa

Posted 2015-07-29T15:19:38.287

Reputation: 145

Answers

2

The registry key:

HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\<protocol>\UserChoice\Progid

where is http, https, mapi, ftp etc) enter image description here

You will see that in my case FirefoxURL is my default for HTTP making Firefox my default browser for HTTP.

Other browser records include:

  • FirefoxURL (Firefox)
  • ChromeHTML (Chrome)
  • IE.HTTP (Internet Explorer)

Hope this helps.

Bonus points:

    $computerList = @("Server1", "server2")
$cred = Get-Credential

ForEach ($Computer in $computerList) {

    New-PSSession -ComputerName $Computer -Credential $cred | Out-Null
    Invoke-Command -Session (Get-PSSession) -ScriptBlock {
        Write-Host $env:COMPUTERNAME
        Write-Host (Get-ItemProperty HKCU:\Software\Microsoft\windows\Shell\Associations\UrlAssociations\http\UserChoice).Progid
        Write-Host "`n"
    }
    Get-PSSession | Remove-PSSession

}

Something like this should help.. although it relies ona user being logged on and you having powershell remoting enabled (to enable powershell remoting, run Enable-PSRemoting -Force as a startup computer script via group policy)

Also, you can install PowerShell 4 on your windows 7 machines to allow this functionality - see http://social.technet.microsoft.com/wiki/contents/articles/21016.how-to-install-windows-powershell-4-0.aspx for more

Fazer87

Posted 2015-07-29T15:19:38.287

Reputation: 11 177

Thank you! Now I just need to retrieve this piece of information using PowerShell. – Imsa – 2015-07-29T15:37:30.850

Have a look at my updated answer :) – Fazer87 – 2015-07-29T15:46:40.797

Great! :) 'Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice" |% {$_.ProgId} ' this works too. So what's the difference? – Imsa – 2015-07-29T16:10:11.077

Mine grabs the one property from the registry key "Object" and displays it. Yours grabs the whole key and then does a "where" comparison to find only the property you want.. 2 different methods that do pretty much exactly the same thing in 2 different ways to get the samw end result... I love PowerShell – Fazer87 – 2015-07-29T16:17:45.570

-2

You don't need to edit the registry. Go to Control Panel -> All Control Panel Items -> Default Programs -> Associate a file type or protocol with a program.

Below the list of extensions (including .htm and .html) you will see the protocols, and you can view or change the associated program. The protocol list includes HTTP, HTTPS and FTP.

This applies to Win8.1. WinXP uses Explorer -> Tools -> Folder Options... -> File Types, and the protocols precede the extensions. I'm not sure about every intermediate version.

AFH

Posted 2015-07-29T15:19:38.287

Reputation: 15 470