3

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.

3
  • 1
    All relevant information should be in the question body instead of a comment.
    – Ramhound
    Commented Dec 4, 2018 at 21:12
  • 1
    How are you running this for the other users? Commented Dec 18, 2018 at 0:54
  • 1
    Hi! I've tried using the code form this post link and making my own version of the code. But it doesn't really work more than once (or once for that matter) because Windows 10 creates a unique hash every time you set a browser as default. Even being the same browser seconds after the first time.
    – msmafra
    Commented Feb 17, 2019 at 16:37

1 Answer 1

0

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

1
  • 1
    Yes you're in good direction. Explain your answer with more details, like how one can do that? What steps do they need? What do the commands do? Some example. etc.
    – Biswapriyo
    Commented Feb 21, 2019 at 15:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .