Link to home
Start Free TrialLog in
Avatar of Lansing Nye-Madden
Lansing Nye-MaddenFlag for United States of America

asked on

How do I set default web browser via script?

How do I set the default browser via batch or powershell script in Windows 10? I need to override Microsoft Edge as the default browser and replace it with Internet Explorer for a customer. What would be the best practice for going about this?
Avatar of Nicolas Lecanu
Nicolas Lecanu
Flag of Guadeloupe image

Hi Lansing,

I found this page who set Chrome as default browser in Windows 10, maybe you can o the same but for IE.
Why the blind link?
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "%windir%\system32\control.exe /name Microsoft.DefaultPrograms /page pageDefaultProgram\pageAdvancedSettings?pszAppName=google%20chrome"
WScript.Sleep 1200
WshShell.SendKeys "{TAB}"
WshShell.SendKeys " "
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys " "
WScript.Quit

Open in new window

blind link ?
Oh, I don't read that, thank you very much Shaun Vermaak !
Ok, so we have to say the answear here and not just give a link to the answear and explain why and how.

I just have the idea for Lansing, to juste change "google chrome" in the script that Shaun write at the end of the line 2
Ok, so we have to say the answear here and not just give a link to the answear and explain why and how.
Yes, unless vendor site or EE link
ASKER CERTIFIED SOLUTION
Avatar of Lansing Nye-Madden
Lansing Nye-Madden
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you, for this solution, this will be helpfull if I have to do this one day.