Scripting the default browser at startup of Windows 10?


Recommended Posts

My work laptop uses Windows 10 Professional and it seems that the GPO is making Internet Explorer 11 the default browser each time it is powered on.

 

We are free to change the default browser in Settings > Apps > Default apps but it resets back to Internet Explorer 11 upon reboot.

 

Is there a CMD script I can place in the Startup folder that changes this for me each time? (or, another solution)

I've done a bit of searching, and for the most part it doesn't look like it's possible. People are saying that Microsoft removed the option in Windows 10 in an attempt to prevent malware from changing the default programs.

 

But I did find this .vbs script on Superuser:

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

While I would assume that you would just need to change "google%chrome" to the browser you want to set as default, I don't understand how it knows to set it as the default browser and I don't know why it sends the tabs and spaces afterwards.

 

I would say that if the company allows you to change your default browser there shouldn't be a need for the GPO to be in place to change that setting back after each session. Maybe ask your IT security team about turning that policy off?

  On 23/10/2018 at 10:16, Nick H. said:

I've done a bit of searching, and for the most part it doesn't look like it's possible. People are saying that Microsoft removed the option in Windows 10 in an attempt to prevent malware from changing the default programs.

 

But I did find this .vbs script on Superuser:

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

While I would assume that you would just need to change "google%chrome" to the browser you want to set as default, I don't understand how it knows to set it as the default browser and I don't know why it sends the tabs and spaces afterwards.

 

I would say that if the company allows you to change your default browser there shouldn't be a need for the GPO to be in place to change that setting back after each session. Maybe ask your IT security team about turning that policy off?

Expand  

It's the NHS we're talking about.

My I.T. team disabled notifications system-wide when they first upgraded to Windows 10 because 'we didn't want to bombard users with notifications'.

  On 23/10/2018 at 10:16, Nick H. said:

would say that if the company allows you to change your default browser there shouldn't be a need for the GPO to be in place to change that setting back after each session. Maybe ask your IT security team about turning that policy off?

Expand  

Or better yet, stop messing around with company hardware/software configurations.

  • Like 3
  On 23/10/2018 at 10:29, Danielx64 said:

Or better yet, stop messing around with company hardware/software configurations.

Expand  

What rubbish are you talking about?

They allow us to change it manually, so why not have a startup script to do it for us?

  On 23/10/2018 at 10:33, Elliot B. said:

What rubbish are you talking about?

They allow us to change it manually, so why not have a startup script to do it for us?

Expand  

If the IT department set something via GPO, they have done that for a reason. Just because they haven't disabled the option to let you change the default browser it doesn't mean that you want you to change it.

  On 23/10/2018 at 10:36, Danielx64 said:

If the IT department set something via GPO, they have done that for a reason. Just because they haven't disabled the option to let you change the default browser it doesn't mean that you want you to change it.

Expand  

That's their issue.

 

I'm not circumventing anything by having a script change the default for me instead of me doing it manually each time.

Most require a program to achieve what you are looking for, example http://kolbi.cz/blog/2017/11/10/setdefaultbrowser-set-the-default-browser-per-user-on-windows-10-and-server-2016-build-1607/

 

What I use is called EdgeDeflector because Microsoft insists on ignoring the default browser choice inside OS dialogs and certain apps and launching Edge instead of my default Chrome preference.

The way I've been doing at my job since MS took away our ability to customize the default profile like we were doing, is by using DISM.

 

Set the defaults the way you want them, and then run:

 

Dism.exe /Online /Export-DefaultAppAssociations:%USERPROFILE%\Desktop\AppAssoc.xml

 

Place that XML file somewhere for use in below command. Then at login, login script, run the following:

 

Dism.exe /Online /Import-DefaultAppAssociations:"FULL PATH"\AppAssoc.xml

  • Like 3
  On 23/10/2018 at 10:29, Danielx64 said:

Or better yet, stop messing around with company hardware/software configurations.

Expand  

This isn't the first topic like this from the OP, nor would I doubt it being the last. He's part of the reason people in IT get frustrated with users, always trying to circumvent their work. You might see something as a small change or unnecessary, but there are reasons policies are put in place. 

 

  On 23/10/2018 at 10:38, Elliot B. said:

That's their issue.

 

I'm not circumventing anything by having a script change the default for me instead of me doing it manually each time.

Expand  

I guess the better question is, why not ask them about it? There is obviously a reason they have set this, and if there isn't maybe they give you a kudos for bringing something up that shouldn't be set that way. I probably would've fired you long ago for trying to circumvent policies put in place.

  On 25/10/2018 at 03:56, Circaflex said:

This isn't the first topic like this from the OP, nor would I doubt it being the last. He's part of the reason people in IT get frustrated with users, always trying to circumvent their work. You might see something as a small change or unnecessary, but there are reasons policies are put in place. 

 

I guess the better question is, why not ask them about it? There is obviously a reason they have set this, and if there isn't maybe they give you a kudos for bringing something up that shouldn't be set that way. I probably would've fired you long ago for trying to circumvent policies put in place.

Expand  

Oh look, it's Circaflex.

 

Thank you for the help, those of you that tried :)

Edited by Elliot B.
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • No mention of the new Apple TV 8K?
    • I really hate it that I can't access the historical changes in my notes and if I accidentally delete large portions of the text which happens more often than not, sometimes, there's no recovering. There should always be a way to go backwards in time, simply because we have iCloud. And why is there no normal export capability? There should be a historical-change-back up and export capability.
    • SeaMonkey 2.53.21 by Razvan Serea The SeaMonkey project is a community effort to develop the SeaMonkey all-in-one internet application suite. Such a software suite was previously made popular by Netscape and Mozilla, and the SeaMonkey project continues to develop and deliver high-quality updates to this concept. Containing an Internet browser, email & newsgroup client with an included web feed reader, HTML editor, IRC chat and web development tools, SeaMonkey is sure to appeal to advanced users, web developers and corporate users. Under the hood, SeaMonkey uses much of the same Mozilla source code which powers such successful siblings as Firefox, Thunderbird, Camino, Sunbird and Miro. Legal backing is provided by the Mozilla Foundation. SeaMonkey 2.53.21 changelog: Unable to load JSON Bookmarks file, Open/Cancel do the same thing bug 1940204. Move replaceVars helper into menu-manager.js for cZ bug 1937379. Remove dumpObject helper from utils.js in cZ bug 1937380. Remove toOpenWindowByType helper from utils.js in cZ bug 1937382. Fix makeLogName helper to not encode twice in prefs.js in cZ bug 1937387. Remove use of escapeFileName helper and tidy up pref_mungeName helper in cZ bug 1937395. Add helper to file-utils.js for ensuring an nsIFile is returned in cZ bug 1937397. Remove unused http.js file from cZ bug 1937890. Remove unused IRC tests from static.js in cZ bug 1937896. Switch from deprecated escape/unescape in cZ bug 1938933. Tidy up use of prefBranch outside of pref-manager in cZ bug 1938935. Make use of pref fallbacks in pref-manager in cZ bug 1938937. Remove unused edit context menu from cZ bug 1939929. Use XPCOMUtils.generateQI in connection-xpcom in cZ bug 1939930. Merge menus.xul, popups.xul and scripts.xul into chatzilla.xul bug 1939958. Make use of toSOutputStream and toSInputStream helpers in DCC code in cZ bug 1939965. Stop hard-coding commandkey for reloadui in cZ bug 1939968. Use suite's FillInHTMLTooltip helper instead of having own version in cZ bug 1939969. Split custom-away from other away/back commands in cZ bug 1942655. Remove ChatZilla Homepage link from Help menu and about command in cZ bug 1942916. Re-arrange toolbar menus in cZ bug 1943783. Remove ChatZilla Homepage link from about and prefs dialogs in cZ bug 1943844. Use custom controller for userlist and tidy up some controller use in cZ bug 1945325. Make use of observes for show/hide elements in cZ bug 1945378. Don't dynamically create focus-input key element in cZ bug 1947028. Remove unused toolbar creation code in cZ bug 1947030. Remove unused updateMenus code from cZ bug 1947031. Clean up whitespaces in cZ package manifest bug 1947040. Remove unused uninstallKeys code from cZ bug 1950002. Use node.remove(), especially instead of node.parentNode.removeChild(node) in cZ bug 1951250. Remove __cz_condition from cZ bug 1951253. Remove outputWindowURL pref from cZ bug 1951256. Remove unused JS tests in cZ bug 1951297. Use includes, startsWith and endsWith instead of indexOf and substr in cZ bug 1951302. Use {} and [] instead of new Object() and new Array() in cZ bug 1951303. Fixup function naming for lint in cZ bug 1955141. Fixup method naming for lint in cZ bug 1955767. Remove old Mozilla 1.0 code from updateAppMotif in cZ bug 1955771. Use throw Components.Exception in cZ bug 1955774. Migrate output-window from HTML to XHTML to make localisation more standard in cZ bug 1955825. Merge munger.js into mungers.js in cZ bug 1956373. Remove unused tagName from mungers.js in cZ bug 1956374. Flatten directory structure in cZ bug 1956375. Tidy up about dialog page in cZ bug 1956376. Add helper to commands.js for sending CTCP commands in cZ bug 1956377. Migrate to standard menus for menu toolbar in cZ bug 1957763. Install plugin dialog broken in cZ bug 1961599. cZ change nick menu not working bug 1962112. Away status isn't reflected correctly in all channels in cZ bug 1962234. Fix dark motif userlist in cZ bug 1967072. SeaMonkey Composer adds moz-do-not-send attribute for links and images bug 1827146. Use menu_Toolbars overlay for navigatorOverlay and console bug 1945335. Remove defunct 2.53 prerelease builds from debugQA extension bug 1947043. Handling of MOZ_LANGPACK_CONTRIBUTORS in defines.inc files should be less custom bug 1951101. Control + U shortcut for underlined text is not working bug 1872514. Context menu search (with default search engine) does not work in the content area of a message compose or SM-Composer window bug 1062092. The following bugs were fixed in our branch of the Gecko source code only: on FreeBSD sqlite3 fails to link for missing math functions bug 1944954. Expand init.configure to use version_package.txt to set MOZ_PKG_VERSION bug 1952757. Change supported msvc Compilers for SeaMonkey 2.53 bug 1954176. SeaMonkey 2.53.21 contains (among other changes) the following major changes relative to SeaMonkey 2.49.5: The Bookmarks Manager has switched its name to Library, and now also includes the History list. When History is invoked, the Library will be shown with the History list selected. The extensive modifications were needed because of Mozilla Gecko platform API changes. Download Manager has been migrated to a new API. Although it looks pretty much the same as before, the search option is missing and some other minor details work differently. The previous downloads history is removed during the upgrade. The layout panel was added to the CSS Grid tools. TLS 1.3 is the default SSL version now. Support for all NPAPI plugins like Flash, Java and Silverlight has been removed. For displaying pdf files in the browser you can use pdf.js-seamonkey from Isaac Schemm. SeaMonkey now uses a new api for formatting regional data like time and date. Default is to use the application locale of the current SeaMonkey build. If you use a language pack or a different OS formatting this is usually not desired. You can change the formatting from the application locale to the regional settings locale (OS) in the preferences dialog under "Appearance". SeaMonkey 2.53.21 uses the same backend as Firefox and contains the relevant Firefox 60.8 security fixes. Download: SeaMonkey 64-bit | Portable SeaMonkey 64-bit ~60.0 MB (Freeware) Download: SeaMonkey 32-bit | Portable SeaMonkey 32-bit View: SeaMonkey Website | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • It doesn't work for the view, but the music gets me every time:  
  • Recent Achievements

    • First Post
      Uranus_enjoyer earned a badge
      First Post
    • Week One Done
      Uranus_enjoyer earned a badge
      Week One Done
    • Week One Done
      jfam earned a badge
      Week One Done
    • First Post
      survivor303 earned a badge
      First Post
    • Week One Done
      CHUNWEI earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      428
    2. 2
      +FloatingFatMan
      207
    3. 3
      snowy owl
      194
    4. 4
      ATLien_0
      191
    5. 5
      Xenon
      141
  • Tell a friend

    Love Neowin? Tell a friend!