I have had this request a couple of times now, on how to make Internet Explorer the default browser in Windows 10. I think Microsoft Edge is and will be a great browser and the most secure browser out there but in some scenarios Internet Explorer is still required to be the default browser.
Here is how to export the associations from one Windows 10 computer and then import them during OS deployment on the target computer which is the way to do it. It exports all file associations so it can be used for 3rd party applications as well.
To export the file associations from a computer running Windows 10 do the following.
- Log on to the computer as a user that is local administrator and open Settings and then System
- Under Default Apps mark the Web Browser and click Microsoft Edge, then you get an option on which browser to use instead, select Internet Explorer
- Then open and Command Prompt with Run as administrator.
- In the command prompt type, the following command to export the file associations.
C:\WINDOWS\system32>Dism.exe /online /Export-DefaultAppAssociations:C:\Windows\Temp\DefaultApps.xml
- In the C:\Windows\Temp we now have a file with the default associations.
To import the file associations during OS deployment when deploying Windows 10 the following steps are needed. The easiest way is to use a .cmd file and the “%~dp0” variable that gives us the path to the folder the .cmd file is executed from.
- Create a folder in your source folder structure that can be used as a package source for the Default Apps Association package.
- Copy the DefaultApps.xml file we just created to that folder
- Create a new file in the folder called DefaultApps.cmd with the following content
Dism.exe /online /Import-DefaultAppAssociations:%~dp0Defaultapps.xml - Then we have the following files in that folder
- Create a Package in Configuration Manager and use the folder created as the source folder. Do not create a program. By using Run Command line, it is easier to add more .xml files so that we can import different files based on different roles or purpose for the target computer.
- In your OS deployment Task Sequence create a new “Run Command Line” step somewhere after the “Setup Windows and Configuration Manager” step.
- Then you are ready to test deploy a Computer and test the updated Default Associations
This procedure is the same as it was for Windows 8 / Windows 8.1 and can be applied to Adobe Reader as well for instance or other 3rd party applications as well.
I have tried this, but EDGE is still the default browser, Any ideas?
The export runs as advertised, except that it only exports some file extensions. My list is only maybe 10 lines long. Why doesn’t it export them all?
I noticed that the export will only export file extensions that you specifically “touched” in the “Associate a Program with a File” control panel applet. What I did, was I went through the list of all the programs I needed setup first (i.e., Adobe Reader, Firefox / Chrome, Windows Photo Viewer, etc.) and ticked each item I wanted. Afterwards, I did the export and it then picked those items up.
works fine!
Hi Jörgen. It works fine with OSD i SCCM 1602, but do you have any experience with this when doing in-place upgrade
Same problem as Kode Hunt
Vegard and Kode – When running the elevated command prompt to export out the xml file are you using the same credentials as the account you are logged into the desktop with? I saw a similar result when using a different admin account.
The export and import all work flawlessly however Windows keeps reverting back to Edge and popping up a toast telling the user that it is doing so about 5 to 10 min after initial login of the first user to log on post inplace upgrade. Is anyone else seeing this? I am using MDT without sccm and Win10 1511.
Follow this instruction and it worked like a charm, also for pdf etc.
I am seeing the same thing as Anthony above. The File Associations are being “taken over” after the end user logs into the machine. “An App Default Was Reset”… seems to have started once we started using the 1511 media.
Followed the instructions, tried running the CMD but nothing changes, flooded with “An app default was reset” error messages. On Win 10 Pro build 1511
This seems to work on new users, but if I have users created and logged into before Sysprep, it doesn’t seem to work for those users. Instead, the user gets a barrage of “An app default was reset” notifications.
Microsoft needs to fix this. I’m all for preventing unwanted file re-associations, but there has to be a way administrators can do their jobs in the Pro, Enterprise, and Education versions of Windows 10.
Seems like after 1607 the import-defaultappsassociations no longer works. When you login afterwards you get the reset message for pdf/edge/photos. Has anyone found a work around for this?
Thanks
Try my method of scripting the browser to IE 😉 Nothe the following code needs to be
saved as IEdefault.vbs before running. Enjoy
Set WshShell = WScript.CreateObject(“WScript.Shell”)
WshShell.Run “%windir%\system32\control.exe /name Microsoft.DefaultPrograms /page pageDefaultProgram\pageAdvancedSettings?pszAppName=Internet%20Explorer”
‘ Give Default Programs time to load
WScript.Sleep 1200
‘ WshShell.AppActivate “Set Program Associations”
WshShell.SendKeys “{TAB}”
WshShell.SendKeys ” ”
WshShell.SendKeys “{TAB}”
WshShell.SendKeys “{TAB}”
WshShell.SendKeys ” ”
Msgbox “Default Browser: Internet Explorer”
WScript.Quit
I have been stuck with this problem for almost 2 weeks, after applying your method IT WORKED..!! Thank you so much.
The script worked. However the quotes where all fancy quotes and I had to re-type them all. May the font on this website messed them up.
Hi, the vbs script from Raz works great. Excellent. Thanks
Hi Raz, Great script but how do i stop the program associations window from opening?
@Raz: Thanks man! I tried several things and your script worked great.
I tested it on W10 1607
Hi, does anyone have any new tips about this on Win10 1607? Setting it with GPO forces IE11 on every restart. Settings it during OSD causes the error messages on first logon.
Thanks
/Dan
If you’re looking to set it for NEW users, you can actually do the ‘dism /online /Export-DfaultAppAssociations \\server\share_name\location\appDefaults.xml’ on your master image / PC. Then, on the target machine, copy the XML file you get (rename it to ‘OEMDefaultAssociations.xml’) to %WINDIR%\System32 folder. The copy could be done via script, GPO, or whatever means works for your environment. In my case, since I create each of my images in a virtual machine, I just manually copied the ‘OEMDefaultAssociations.xml’ file to the System32 folder before I ran sysprep and captured the image.
If I export the xml and delete everything except the things I want to define for example .pdf files and html what will happen to all the other associations I’m not setting? Will it only change the associations for the things that are explicitly defined?
The issue is not making IE the default browser. It’s making IE the INITIAL default browser for all new users who login but having them be able to change it to whatever they want after the fact. That’s the big problem with the GPO solution that’s all over the Internet in blogs and posts. The GPO can make IE or any other browser the default but it hard sets it and the user cannot change it. This is the huge problem. I tested the solution using the .cmd file and it seemed to work with multiple user logins. How did this get accomplished? Meaning, I logged in with one user and changed the default browser to Google Chrome (after downloading and installing it). Then, I logged in with another user account and IE was the default and was able to change it. The XML affects the registry right? So then for each user, does the user selection change it? If that were true, then wouldn’t my second user login then go back to Edge? I’m just trying to understand with the DISM import does and how that relates to the user’s initial web browser and their ability to change it. Thanks!
Hi,
The DISM import changes the values applied for each new user profile created on the computer, so if a user already have a profile on the computer their own settings will apply. In windows 10 all default application choices are per User and not per device.
Regards,
Jörgen
Does it still work on Win 10 1703?
Hi,
Yes it does
Regards,
Jörgen
We’re finding that this does not set IE as the actual Default Web Browser (as defined in Settings\Default Apps) but it sets IE as the default for HTM and HTML file extensions. So if there is a URL listed in an email for example, when the user clicks on the URL it won’t open because the “Default Web Browser” is not set. We’re seeing this on 1703 and 1709 builds.
The script from RAZ will set the actual Default Web Browser. I *think* that might take care of everything all in one shot (both file associations as well as URLs).
How do you “use” the script from Raz? I’m already using a script to apply all my default apps from my xml. So do I need to still create my xml which sets all of my defaults, use the CMD to apply the xml and still run this script from RAZ on top of that, to get IE to be default?
Jörgen, since I am using only MDT (do not have Enterprise Server or SCCM, Config. Mgr), do you know of instructions I can use for steps 5 & 6 which apply to MDT?
I have used this in a previous version but ever since switching to windows 10 1709 when a new user logs in we get the pop up default app reset and it resets from IE back to Edge. Does this still work with ver 1709 or is there another to accomplish it.
Thanks
Hi,
I received the following error on smsts.log
Process completed with exit code 2
means: The system cannot find the file specified.
More logs:
Executing command line: Run command line with options (0, 4)
D:\SMS\PKG\CCM00080>Dism.exe /online /Import-DefaultAppAssociations:D:\SMS\PKG\CCM00080\Defaultapps.xm
Deployment Image Servicing and Management tool
Image Version: 10.0.17134.112
Process completed with exit code 2
Error: 2
Could not save D:\SMS\PKG\CCM00080\Defaultapps.xm as the OEM default assocations file in the image.
I used “%~dp0” variable