User Tools

Site Tools


windows:defaultbrowser_win10

Default Web Browser on Windows 10

Description

  • The script is pretty simple it opens the Settings App then goes to Default Applications. Then it sends key-strokes to tab down to the default web browser and tab the correct number of times to select Google Chrome

Example Script

default_chrome.vbs
Set WshShell = WScript.CreateObject("WScript.Shell")
WScript.Sleep 10000
' Chrome Default browser for WIN10
WshShell.Run "%windir%\system32\control.exe /name Microsoft.DefaultPrograms /page pageDefaultProgram\pageAdvancedSettings?pszAppName=Google%20Chrome"
 
' Give Default Programs time to load
WScript.Sleep 3000
' Send keys to set Chrome as default Browser
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys " "
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WScript.Sleep 500
WshShell.SendKeys " "
WScript.Sleep 500
WshShell.SendKeys "%{F4}"
windows/defaultbrowser_win10.txt · Last modified: 2018/09/13 13:33 by tschulz