You can change the file associations in Windows operating system in several ways. You can configure the application with which you can open certain types of files from the user’s GUI (however this setting will be applied only in the current user’s profile). If you want to associate some file extensions with a specific application for a multiple domain users, it is much easier to use Group Policy features.
In this article we’ll show you how to change the association for files with the extension * .doc and *.docx using Group Policy Preferences.
Set default File Associations using GPO
Open the Group Policy Management Console (GPMC.msc), create a new GPO and assign it to the OU with the users which this settings should be applied to.
Switch to the GPO editing mode. In the GPO editor, go to the section User Configuration -> Preferences -> Control Panel Settings -> Folder Options.
We are interested in the Folder Options which allow to create, edit or delete Open With associations of various file name extensions.
Create a new parameter New -> Open With.
Fill the fields as follows:
- Action: Update
- File Extension: doc
- Associated Program: exe
- Set as default: check the option
Tip. In some cases, when there is missing path to the application executable file in the system environment variables, you should specify it like this: %ProgramFiles%\Windows NT\Accessories\wordpad.exe. Also note that the path to the program may differ depending on the architecture of the system (x86 or x64), so it is preferable to use the variable %ProgramFilesDir%.
Now configure the association for the .docx extension in the same way. As a result, it should get such policy:
It remains to update the Group Policy settings on the client (gpupdate/force or perform Logoff/Logon) and check its operation. For example, we previously changed the association of .doc and .docx files to use wordpad.exe. After applying the policy, the files began to open with MSWord (winword.exe) as you specified in the GPO.
To understand what changes were made to the system by this policy, open the Registry Editor and go to the HKEY_CURRENT_USER\Software\Classes.
For the *.docx file extension a connection was established with a new class docx_auto_file. In turn, for the docx_auto class in the branch HKEY_CURRENT_USER\Software\Classes\docx_auto_file\shell\Open\ the command indicates that winword.exe will be used to open such files.
Setting file associations using the GPO will also prevent situations when user change (or reset) the association of files and then they have a problem when opening a file.
- How to Setup Gmail in Outlook? - October 14, 2021
- How to Clear Browsing History in Safari on iPhone/iPad? - October 11, 2021
- Allow Non-administrators to Install Printer Drivers via GPO - October 1, 2021