Carl Webster Accessibility Statement

Carl Webster is committed to facilitating the accessibility and usability of its website, carlwebster.com, for everyone. Carl Webster aims to comply with all applicable standards, including the World Wide Web Consortium’s Web Content Accessibility Guidelines 2.0 up to Level AA (WCAG 2.0 AA). Carl Webster is proud of the efforts that we have completed and that are in-progress to ensure that our website is accessible to everyone.

If you experience any difficulty in accessing any part of this website, please feel free to email us at info@carlwebster.com and we will work with you to provide the information or service you seek through an alternate communication method that is accessible for you consistent with applicable law (for example, through telephone support).

  • Citrix XenApp 7.x on Windows Server 2012 or 2012 R2 – Setting File Type or Application Associations

    One of the nice things about being a consultant is that on every project, you run into something you had never seen before or asked to do something no one else has asked you to do before. As a consultant, I am always learning new things or a new way of doing something I have been doing for years. Recently I was asked to help finish up a XenApp 7.6 deployment running on Windows Server 2012 and Server 2012 R2. One of the problems I was tasked to resolve was that some application associations were not working. One specific example was that embedded links in emails, when Ctrl+Clicked, would not open in the default browser. Here is how I solved that issue.

    In versions of Windows before Windows 8/Server 2012, I always used a Group Policy Preference (GPP) to set File Type Associations. However, for the applications published on Server 2012+, the GPP never set any associations. As in most cases, when I am stumped, I turned to super-smart young squirt Jarian Gibson. Jarian told me he had just solved this for one of his customers in the previous week or so.

    This is the solution Jarian pointed me to – Windows 8: Associate a file Type or protocol with a specific app using GPO.

    I found these parts of the article interesting:

    In  Pre-Win 8, apps could set the default handler for a file type/protocol by manipulating the registry, this means you could easily have a script or a group policy manipulating the registry.

    However In Win 8, the registry changes are verified by a hash (unique per user and app)  that detects tampering by apps. In the absence of a valid hash, we ignore the default in the registry.

    Solution:
    Microsoft  have  introduced a new GP mechanism for declaring these defaults in Win 8 to accommodate this type of scenario.

    That TechNet blog pointed to another TechNet article on using Dism.

    The Solution

    To set the associations, use the following steps:

    On the XenApp server running Windows Server 2012+, run the following command, as shown in Figure 1.

    Dism /Online /Export-DefaultAppAssociations:\\Server\Share\AppAssoc.xml
    
    Figure 1
    Figure 1

    Verify the XML file exists, as shown in Figure 2.

    Figure 2
    Figure 2

    Open the Group Policy Management Console (GPMC) and create a new group policy, as shown in Figures 3 and 4.

    Figure 3
    Figure 3
    Figure 4
    Figure 4

    Edit the new group policy, and navigate to Computer Configuration\Policies\Administrative Templates\Windows Components\File Explorer\Set a default associations configuration file, as shown in Figure 5.

    Figure 5
    Figure 5

    Enable the Set a default associations configuration file policy setting and enter the path to the XML file, as shown in Figure 6.

    Figure 6
    Figure 6

    Click OK, exit the group policy editor, and link the new policy to the appropriate Organizational Unit for your XenApp servers that use Windows Server 2012+. After the group policy refresh interval or restarting the server(s), the new group policy setting will apply, and application associations will work.

    The main problem with this new method is that the XML file is static. If any new applications (with file type associations) are installed, the XML file will need to be recreated.

    I hope this helps someone else who finds themselves in the same situation of setting File Type or Application associations for Windows Server 2012 or Server 2012 R2.

    Thanks

    Webster







    About Carl Webster

    Webster is a Sr. Solutions Architect for Choice Solutions, LLC and specializes in Citrix, Active Directory and Technical Documentation. Webster has been working with Citrix products for many years starting with Multi-User OS/2 in 1990.

    View all posts by Carl Webster

    15 Responses to “Citrix XenApp 7.x on Windows Server 2012 or 2012 R2 – Setting File Type or Application Associations”

    1. Bart Says:

      I’ve inherited an environment and I need to associate .txt and .xml files for published apps to open with Notepad++. Notepad++ is published.
      App servers are 2012R2 Citrix 7.15CU2.
      I’ve followed the dism and GPO suggestion and it will not work for me. I’ve not heard what permissions are needed on that shared XML file so I gave it “Everyone” R/X.
      Also in the published Application section in Studio the File Type Association for Notepad++ populates blank.
      Please.. is there anything I’m missing? This is kind of a big deal for one of the applications the users need. They txt auto opens in Notepad.exe and crashes due to size, and xml asked user to specify what to open with but Notpad++ is not listed and they can’t browse the C:/D: drive to manually select it.

      Reply

      • Carl Webster Says:

        Yeah, I wish this was something that Citrix/Microsoft could/would fix.

        My understanding is that you need to login to the XenApp server as the account used for launching Studio. Open your apps to allow the file extension registration on the server. Supposedly, you should now see the file extensions available in the published app properties.

        Webster

        Reply

    2. LL Says:

      I installed Crystal Reports and see that Crystal is the default program for RPT files. Studio doesn’t see any Crystal extensions when I publish Crystal as an app. When I run the DISM command the xml file does not include the RPT extension. How do I get Studio to recognize the extensions for Crystal Reports?

      Reply

    3. Rob Says:

      Shocking behaviour from Microsoft and Citrix not working together.

      Citrix keep promoting flexibility with URL redirection / host to client redirection / bi-directional url redirection and now HTML5 Browser redirection. These technologies are unusable. The amount of effort required on both ENDPOINT and SERVER SIDE to get all the components working “zero touch” is impossible to achieve. Even when you do manage to get it working, dual monitors and screen flickers, start menu docking focus lost. Its basically smoke and mirrors that breaks more than it works. Utter Dross!

      Reply

    4. gino Says:

      i have a xenapp 7.6 farm that i need to install Chrome on and only have one application use chrome.
      so basically when i launch chrome (published app) it is asking me to finish the install and it is prompting me to select Chrome or Internet Explorer.

      is there a way without changing my default browser to have chrome not ask this.
      i dont want to change my default browser.
      we are using Chrome enterprise with GPO settings.
      thank you

      Reply

    5. Dries Vandooren Says:

      Hi Webster
      We have a similar problem with a windows server 2016, if we try to open a URl, it keeps asking what program we’d like to open the link with. Even if we select “always use this app” it doesn’t stay as default. I tried this way to fix it, but it doesn’t appear to work. Do you know of a fix for this problem with windows server 2016?
      We’ve tried numerous things the last week, but nothing seems to fix this issue.

      Reply

    6. Kevin Says:

      I Tried this group policy with xml file and found that after you implement this and then someday down the road you uninstall a program the server crashes on reboot because that application is in the .xml and not installed anymore.

      Reply

      • Carl Webster Says:

        I checked with two Group Policy MVPs who have never heard of this issue.

        Webster

        Reply

      • Carl Webster Says:

        I am unable to duplicate the issue.

        I created a XenApp 7.13 server based on Server 2016.
        I installed Google Chrome, IrfanView, 7Zip and Adobe Reader DC.
        I set all four apps to be the default handler for all their file types.
        I opened files of various types to make sure the right programs were used.
        I then did the “dism” stuff to export the app associations to an XML file.
        Created a GPO linked to the OU where my XenApp server is for App Associations.
        I restarted the server and made sure the GPO applied.
        I opened files of various types to make sure the right programs were used.
        I uninstalled IrfanView which gave me a popup saying all the file types were reset to Windows defaults Restarted the server and logged in. No server crash.
        I opened a PNG and a JPG file and they both open in Paint.
        I uninstall Adobe Reader DC.
        Restarted the server and logged in. No server crash.
        I opened a PDF and it opened in Chrome.
        I uninstalled 7Zip.
        Restarted the server and logged in. No server crash.
        I opened a ZIP file and File Explorer asked to Extract it.
        I uninstalled Chrome.
        Restarted the server and logged in. No server crash.
        I opened an HTML file and Edge started.
        I opened the PDF file and Edge started.

        Unable to repro.

        Thanks

        Webster

        Reply

    7. Brian Mooney Says:

      Carl,
      Can you check out the following Citrix discussion and perhaps lend your ninja skills to the table?

      http://discussions.citrix.com/topic/385357-users-are-prompted-to-specify-internet-browser-when-you-click-on-a-link-in-outlook-2016/?p=1962373

      Reply

    8. James Rankin Says:

      Hi Webster

      The problem I found with Windows 8.x/Server 2012 R2 associations is that they can only be set on a per-device basis. The solution you’ve described works excellently, as long as users don’t need individual FTAs on the XenApp server system.

      Myself and Duncan Murdoch tried to find a way around this – a bit hit-and-miss but we managed to get it working on a XenApp 7.6 instance with a bit of PowerShell jiggery-pokery. See http://appsensebigot.blogspot.co.uk/2015/10/deploying-per-user-file-type.html

      Cheers,

      JR

      Reply

    Leave a Reply