Latest posts by Jörgen Nilsson (see all)
- New in Application requests in SCCM 1906 - Mon, Sep 16 2019
- Application approval in SCCM 1810 and beyond is a game changer - Fri, Jan 25 2019
- Windows 10 1809 kiosk mode with an AD domain account - Mon, Nov 26 2018
In Windows 10, we can no longer use Group Policy Preferences to control file associations, because these settings are now user-based, instead of system-based as they were in Windows 7. To deploy the default file associations, you first have to configure the settings on a reference machine and then export the configuration in an XML file that you can deploy in your network.
Exporting default file associations ^
When Adobe Reader DC starts for the first time, the program prompts you to set it as the default program for PDF files. You also can configure the settings in the Control Panel under Programs > Default Programs > Set Default Program. There you have to select Adobe Reader and "set this program as default."
You can verify that .pdf is associated with Adobe Reader DC in the Control Panel under Programs > Default Programs > Set Association. Note that you can sort the list by the Current Default column.
Once you do that, you have to open a command prompt with the user account from above and use the DISM tool to export the current settings to an .XML file, as shown below.
Dism.exe /online /Export-DefaultAppAssociations:C:\Temp\DefaultApps.xml
Now you have a .XML file with all the file associations from that user. People often ask me if it is possible to deploy just one file association or if they must use the entire file, which also contains all the default settings. The answer is, yes, you can import just the association you need.
In my example below, I removed everything that is not associated with Adobe Reader DC, so we end up with the following XML file:
<?xml version="1.0" encoding="UTF-8"?>
<Association Identifier=".acrobatsecuritysettings" ProgId="AcroExch.acrobatsecuritysettings" ApplicationName="Adobe Acrobat Reader DC" />
<Association Identifier=".fdf" ProgId="AcroExch.FDFDoc" ApplicationName="Adobe Acrobat Reader DC" />
<Association Identifier=".pdf" ProgId="AcroExch.Document.DC" ApplicationName="Adobe Acrobat Reader DC" />
<Association Identifier=".pdfxml" ProgId="AcroExch.pdfxml" ApplicationName="Adobe Acrobat Reader DC" />
<Association Identifier=".pdx" ProgId="PDXFileType" ApplicationName="Adobe Acrobat Reader DC" />
<Association Identifier=".xdp" ProgId="AcroExch.XDPDoc" ApplicationName="Adobe Acrobat Reader DC" />
<Association Identifier=".xfdf" ProgId="AcroExch.XFDFDoc" ApplicationName="Adobe Acrobat Reader DC" />
<Association Identifier="acrobat" ProgId="acrobat" ApplicationName="Adobe Acrobat Reader DC" />
Now you can deploy the default file associations with one of the following methods.
Deploying default file associations with SCCM ^
You can import the default file associations during OS deployment in Configuration Manager using a Run Command Line step in the Task Sequence, either using DISM /Online when the OS is installed or with DISM /Offline when the Windows image is applied and the computer has not yet started the newly installed OS. I usually work with the /Online method.
First, create a package in Configuration Manager that contains the defaultapps.xml file and then create a .cmd file in that directory with the following content:
dism.exe /online /Import-DefaultAppAssociations:"%~dp0defaultapps.xml"
We then add this file to our OS deployment Task Sequence after installing and restarting Windows.
Deploying default file associations using Group Policy ^
You can also deploy the default file associations using Group Policy: Computer Configuration > Administrative Templates > Windows Components > File Explorer. The documentation on Technet states that the user can change the settings afterward, but that is only partially true. You can configure the Group Policy as shown below to deploy the default file associations:
I used a file share in the example above. Make sure that domain computers can read both from the share and from NTFS. You could also copy the .XML file to the machines and apply it from there.
If the file is updated with a new file association, the client will check the content every time someone applies Group Policies. Thus, there is no need to do anything more than update the XML file with new file associations, and they also apply to the clients.
The user can change the file associations after logon, because the corresponding UI is not locked down. However, the next time the user logs on, the file associations that are included in the .XML file will be applied again.
Changing default browser to Internet Explorer ^
At the moment, the only way to set Internet Explorer as the default browser in Windows 10 is to use the Group Policy option. Windows 10 will revert to Microsoft Edge if we change it to Internet Explorer using the DISM tool during OS deployment, showing the following systray message: "An app default was reset."
- If we want to set default file associations for end-users, we must do it during OS deployment using Dism.exe or with a script before the user logs on the first time.
- We can set the default file association for just a specific extension, so there is no need to include everything in the file we import.
- If we configure the default file associations using a Group Policy, the users can change it, but it will revert to our configuration.
- If we want to enforce the default browser to Internet Explorer, we must use the Group Policy option.