How to use group policy to change open with file associations

imageChanging file association windows by hacking the registry can be a very challenging task even if you are using Group Policy Preferences Registry option to apply the changes. However there is an option with Group Policy Preferences that allows you to change the Open With (i.e. File association) for any file type.

Below I show you how you can do this using the simple, yet powerful Folder Options by showing you how to change the default association for .TXT files from Notepad to WordPad.

Step 1. Edit a GPO that is targeted to the used that you want to apply this setting.

Step 2. Navigate User Configuration > Preferences > Control Panel Settings then right click on Folder Options and Navigate to New > Open With .

image

Step 3. Type in the extension in the File Extension and then put in the path to the program you want to have open the file. Then optionally tick “Set as default” and press “OK”

TIP: When specifying the file path keep in mind that it may be different for x86 and x64 platforms therefore it may be best to use the %ProgramFilesDir% variable.

image

Your done… Now when you click on that file type it will open it in the new default open with program you specified.

Before
image
After
image

Author: Alan Burchill

Microsoft MVP (Group Policy)

19 thoughts on “How to use group policy to change open with file associations

  1. Great, just what I was looking for! However, how to deal with the problem of x86 program files? Some of our computers are running XP, others run Windows 7 64 bit. So if I want .jpg to open with Picture Manager, the shortcut should be either %Programfiles%\Microsoft Office\Office12\ois.exe or %Programfiles (x86)%\Microsoft Office\Office12\ois.exe.

    Any ideas on how to address this problem?

  2. Rody, use Group Policy Preferences to manage which platform gets the policy setting.

    Mark Ringo

  3. Alan, thanks for all of the useful nuggets that you provide. I have a question about this post. How would you assign the file extension to a published RemoteApp? This is something that I have been struggling with. I’ve been having to create MSI files and roll them out each time I change. I’d love to use this method but the Resource Kit doesn’t show how to assign an extension to a RemoteApp via anything but MSI.

    Thanks,

    Mark Ringo

    1. The remote app will still execute in the context of the users therefore it should still work… If you only want to apply it to the remote app then apply the policy using loopback on the server hosting the remote app.

  4. But how do you assign to a new/different RemoteApp?

    Example. Lets say that you produce a new remoteapp and wish to now assign that new remoteapp to users in the field. I know how to assign manually but how do you assign .msg files to Outlook RemoteApp via GPO instead of uninstalling and installing the new MSI for each user via policy? I’d love to manage file association attachment to remoteapps via any other method than MSI.

  5. I followed these instructions, but couldn’t get it to work. User opened Outlook, right-clicked on JPEG file attachment in an email and selected “Open”. The file was then opened with Windows Photo Viewer, not MS Office Picture Manager as I have indicated in the policy.

    Am I missing something?

    1. i have the same problem, i tried with ” around the path, create/replace/update… Nothing 🙁

  6. Tested and works all right.

    I am using CMTrace.exe (a log file viewer shipped with SCCM) to be the default viewer for log (.log) files.
    copied it to the \\domain\netlogon\ folder, applied this group policy and now all .log files open with the more convenient than notepad app.

    Awesome tip!

  7. I’d like to find a way to modify the file associations so that more than one app is available to launch a file that has no extension.
    Or to allow opening a .dat file with either word OR excel.

Leave a Reply