User Tools

Site Tools


windows:defaultbrowser_win10

This is an old revision of the document!


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
' IE Default browser for WIN10
WshShell.Run "%windir%\system32\control.exe /name Microsoft.DefaultPrograms /page pageDefaultProgram\pageAdvancedSettings?pszAppName=Internet%20Explorer"
 
' 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.1536863508.txt.gz · Last modified: 2018/09/13 13:31 by tschulz