Educational ICT Virtualisation Specialist

Twitter LinkedIn E-mail
Precedence Technologies Ltd
Technology House, 36a Union Lane
Cambridge, CB4 1QB, United Kingdom
T: +44 (0)8456 446 800 / +44 (0)1223 359900
E: enquiries@precedence.co.uk
FileAssociation

Jump To: Support > KB > Windows > FileAssociation

Altering filetype associations and default browser

Filetype associations

  • When setting up Windows Photo Viewer you need to use SetUserFTA to set Windows Photo Viewer as the default handler for JPEGs, etc.
  • SetUserFTA.exe is copied into NETLOGON
  • \\domain.internal is added to the intranet zone with a user GPO in Administrative Templates/Windows Components/Internet Explorer/Internet Control Panel/Security Page by editing Site to Zone assignment list and adding Value name \\domain.internal with Value 1
  • \\domain.internal\netlogon is added as an unrestricted path to any software restriction policies
  • The basic FTA setting files is created by running the following at a command prompt (must NOT be run from Powershell otherwise the text encoding will be wrong):
    \\domain.internal\netlogon\SetUserFTA.exe get > \\domain.internal\netlogon\fta.txt
    
  • fta.txt is edited to set Windows Photo Viewer as the default handler (more details here):
    .jpeg, PhotoViewer.FileAssoc.Jpeg
    .jpg, PhotoViewer.FileAssoc.Jpeg
    .png, PhotoViewer.FileAssoc.Png
    
  • If CopyTrans HEIC is installed, fta.txt has the following added:
    .heic, PhotoViewer.FileAssoc.Heic
    
  • fta.txt is edited to set the default browser with the following (other browsers are available):
    http, ChromeHTML
    https, ChromeHTML
    .htm, ChromeHTML
    .html, ChromeHTML
    
  • If using a mandatory profile, a shortcut to \\domain.internal\netlogon\SetUserFTA.exe \\domain.internal\netlogon\fta.txt is put in the Start Menu Startup folder of the profile. This is because the Startup folder is run late on in the logon process after the profile and all Active Setup tasks have been run. Attempting to run SetUserFTA from a login script (either through a GPO or from a standard script defined against the user account in AD) was found to be unsuccessful.

Stopping the Open With dialog from being shown

Even when you have set your chosen file assocations, Windows may ask if you want to change them if it thinks that a new application that can also handle the filetype has been recently installed.

To stop this, do one of the following:

  • Set [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Explorer]\NoNewAppAlert=dword:00000001 (for all users)
  • Enable the Do not show the ‘new application installed’ notification GPO in Computer Configuration > Policies > Administrative Templates > Windows Components > File Explorer (for all users - equivalent to above)
  • Set [HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows\Explorer]\NoNewAppAlert=dword:00000001 (for current user only)

Setting default browser

There are further changes required for setting the default browser that SetUserFTA does not handle. The author has also written a utility called SetDefaultBrowser to help.

Run SetDefaultBrowser without any arguments to see the browsers available:
SetDefaultBrowser v1.5
======================
Copyright 2020 by Christoph Kolbicz, https://kolbi.cz

usage: SetDefaultBrowser hive browser
example: SetDefaultBrowser HKLM IEXPLORE.EXE

shortcuts: (no hive needed, will use HKLM) chrome, ie, iexplore and edge

Installed browsers:
===================

HKLM Google Chrome
  name: Google Chrome
  path: "C:\Program Files\Google\Chrome\Application\chrome.exe"

HKLM IEXPLORE.EXE
  name: Internet Explorer
  path: C:\Program Files\Internet Explorer\iexplore.exe

To set a default browser specify it as an argument to SetDefaultBrowser.exe. If the name has spaces in it, you will need quotes around it. Remember to include HKLM, so, for example:

\\domain.internal\netlogon\SetDefaultBrowser.exe HKLM "Google Chrome"

There are number of shortcuts for common browsers, namely chrome, ie, iexplore, edge and edgelegacy. For these you must NOT include HKLM so, for example:

\\domain.internal\netlogon\SetDefaultBrowser.exe chrome

Note that setting the default browser is not sufficient to fix problems opening link from Microsoft Office documents (particularly YouTube and Google Drive). The sequence of events is:

  1. Open Word Document with YouTube or Google Drive links
  2. Ctrl-Click on a link
  3. Link is silently opened with an IE component
  4. Website detects you are using IE and redirects you to a Browser needs updating page
  5. Browser needs updating page opens in default browser, e.g. Chrome, which leads the user to think it is Chrome that needs updating

To fix this, you need to create the registry key described here which will make the link open using the shell which does respect the default browser. In short you need to create DWORD ForceShellExecute = 1 in
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\9.0\Common\Internet

© Copyright Precedence Technologies 1999-2024
Page last modified on August 03, 2023, at 01:21 PM by sborrill