Windows – Powershell to set default browser

browsergoogle-chromepowershellpowershell-3.0windows 10

I created a process using PowerShell to install Chrome. What I am looking to do now is to have PowerShell change the registry for the computer and change the default browser to Chrome.

I would want this done for all users and not just the current user.
Right now I have this

Set-Itemproperty -path HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\https\UserChoice -name "ProgId" -value ChromeHTML -force 
Set-Itemproperty -path HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice -name "ProgId" -value ChromeHTML -force

to set the browser to default, but it is not working.

Best Answer

I would imagine you would need to create the equivalent in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Shell\Associations\UrlAssociations

Related Question