Hosted Apps, Streamed Apps, Seamless Sessions, and Content Redirection

When having a mixed environment of seamless sessions using hosted applications and streamed applications, file type associations (FTA) and content redirection won’t work for streamed applications.  The FTA isn’t recognized and prompts you to select an application to open it with when you click on the streamed application FTA.  In full desktop session that have the XenApp Plugin for Hosted Apps (formerly known as the PNAgent) installed, FTAs and content redirection work properly and the correct streamed application launches fine.  So how do you get around this in a seamless session?  Have the XenApp Plugin for Hosted Apps run within the seamless session.  Below are the steps for setting this up.

What is needed?

First you will need the Citrix XenApp Plugin for Hosted Apps 10.2 or later and the Citrix Offline App Plugin 5.1 or later (formerly known as Citrix XenApp Plugin for Streamed Apps) installed on your XenApp servers.  Citrix XenApp Plugin for Hosted Apps 10.2 and later have pass through FTA enabled for seamless sessions.  Pass through FTA isn’t enabled by default in plugins earlier than 10.2.  If you aren’t able to install one of the newer clients then you can modify the registry to enable this functionality.   Use the following registry key to enable pass through FTA:

Path: HKLM\Software\Citrix\Program Neighborhood Agent

Value Name: EnablePassThroughFTA

Type: REG_DWORD

Value: 1

Next you will need to have the XenApp Plugin for Hosted Apps running in your seamless session.  To accomplish this you will need to call pnagent.exe when your session launched.  To do this you will need to call pnagent.exe from either a logon script or the usrlogon.cmd file.  The usrlogon.cmd file is run every time a session is launched.  You can make a file called usrlogn1.cmd file as well if you don’t want to edit the default usrlogon.cmd file.  The usrlogn1.cmd file is called automatically by the usrlogon.cmd file once it’s created.  Use the following syntax to add to your logon script, usrlogon.cmd, or usrlogn1.cmd file:

Cmd /C “%programfiles%\Citrix\ICA Client\pnagent.exe”

After adding the syntax to call pnagent.exe when the application launched you will then need a way to close the XenApp Plugin for Hosted Apps running in your seamless session.  If this is not implemented the session will close for the user but remain active on the server.  To accomplish this, the LogoffCheckSysModules registry key has to be implemented.  The LogoffCheckSysModules key setup on per executable basis.  Multiple executables can be specified by separating them with a comma and NO spaces between them, for example:

App1.exe,App2.exe,App3.exe

This will need to be enabled on each server in the farm you are publishing applications on.  Use the following registry key to enable LogoffCheckSysModules

Path: HKLM\System\CurrentControlSet\Control\Citrix\wfshell\TWI

Value Name: LogoffCheckSysModules

Type: REG_SZ

String: pnamain.exe

After enabling the LogoffCheckSysModules registry entry you will need to modify the application streaming profile shortcuts so content redirection works with UNC paths and spaces to the application streaming profile.  This also enables a placeholder to be inserted in to the final command line when the application is published.  This is done at the very end of the profiling process where you can add, modify, and remove shortcuts.  This will have to be done for each streamed application you want to enable content redirection for.  Use the following steps and the example screen shot to modify the shortcut in the application streaming profile:

  1. Select the shortcut you want to modify
  2. Click modify
  3. Enter ** in the Command line parameters (optional): section
  4. Click Ok and finish the profiling process

 FTA1

Finally to complete the setup of this you will need to enable content redirection for the FTA’s in the published streamed application properties.  This can be done by modifying the published streamed application properties in the advanced properties section for content redirection.  This will have to be done for every streamed application that you want to enable content redirection for.  Use the following steps and example screen shot below to enable FTAs for content redirection:

  1. Open the Access Management Console
  2. Expand the Applications node
  3. Select a published streamed application and modify the properties
  4. Expand Advanced properties
  5. Select Content Redirection
  6. Enable the File Types for Content Redirection
  7. Click Apply and OK
  8. Repeat for each published streamed application

 FTA2

Now you should be able to launch a streamed application from a seamless published hosted application without issue.  The file type association for content redirection should be recognized in the seamless hosted published application.  If the hosted and streamed published applications are published to the same server they should also launch within the same session.

If you have found this article interesting or if you have any other insights, please feel free to leave comments on this article.

Advertisement

About Jarian Gibson
Jarian Gibson is a consultant that specializes in Citrix and Microsoft technologies. Credentials include being certified as a Citrix Certified Administrator, Citrix Certified Advanced Administrator, Citrix Certified Enterprise Engineer, Citrix Certified Integration Architect, Citrix Certified Instructor, Citrix Certified Sales Professional, Microsoft Certified Technical Specialist, Microsoft Certified IT Professional (Server Administrator, Enterprise Administrator, and Virtualization Administrator) and VMware Certified Professional. Memberships include being a nominated and selected member of the Citrix Partner Technical Expert Council. With over 10 years of experience in the IT field, Jarian has worked for companies such as Securities America Financial Corporation and MTM Technologies. He is currently based in the Kansas City area working for Choice Solutions as a Citrix Practice Manager/Principal Consultant.

19 Responses to Hosted Apps, Streamed Apps, Seamless Sessions, and Content Redirection

  1. Rick rohne says:

    You are the MAN! Nice article.
    I was working on a similar case today and this totally helped.
    Thanks,

  2. Thanks Rick! Glad it could help out.

  3. Marc Bailliet says:

    J – I will second Rick’s comment in all aspects! Working on a similar problem today. Hopefully Citrix will come with a better (simplier) way to address this.
    Thanks

  4. Thanks Marc! Glad it could help out.

  5. Etienne says:

    Great it partially solve my issue of supporting both 2003 & 2007 office versions on same server. Users don’t have published desktop but a published windows explorer (shell has been substitued by a copy of explorer.exe “ctxexplorer.exe) My only issue now is that i can’t start pnagent automatically in a logon script (gpo), i workaround by publishing a specific windows explorer batch file, this way it’s working. I wish now to be able to start pnagent in gpo or logon script to keep a unique file explorer published application

    @Echo Off
    START “PNAgent” “C:\Program Files (x86)\Citrix\ICA Client\pnagent.exe”
    START “Windows Explorer” “C:\WINDOWS\explorer.exe”

    Any help would be appreciated

  6. Calling from a GPO logon script or the usrlogon.com should work. I have done it in both scripts. Make sure you are using a 10.2 client or higher or enable the registry key posted above.

  7. Steve says:

    Hi Jarian!
    This nearly worked for me, but is not quite rigt for me.

    I am still left thinking I am missing a trick here.

    I have a published explorer, and a lot of streamed apps (pretty much all of them) and whilst I can get FTA to run as above, it doesn’t change the icon in the published explorer, eg *.doc looks associated to Wordpad still. Clicking the .doc does launch Word in ica, but the icon doesnt update to the blue W of Word..

    The apps are all streamed to the same XenApp server that is hosting the published Explorer window, so instead of having to kick off a second ica connection, and enable Client Drive Mapping, what i REALLY want is for my FTA to refer to raderun /app “\\profilepath” directly.

    I can see how I can do it with Raderun Assoc and Ftpe but it is a mess.

    Any suggestions people? (Xenapp 5.0 installed on W2k3 all patches)

  8. John Mantsch says:

    This works except the pnamain process is still open on the server for each user.
    I have the LogoffCheckSysModules specified in the regestry on the server. Am I missing something? Other than not closing the session when the app is closed, this works.

    • John Mantsch says:

      I need to correct myself. It takes 5 minutes for the pnamain process to close, and there fore the session is loged off. is 5 minutes normal?

  9. Thanks for such nice post. keep it up… Onthenetoffice

  10. Dennis says:

    Hi Jarian

    Great article – got a brand new Xenapp 5 setup with Win2k8 64bit servers, local installation of office 2007 and streamed applications (visio,onenote,project) where i had same problems with user using published Windows explorer (not being able to browse and open documents)

    which is all solved now. so thanks again.

  11. bjorn bats says:

    how do you start up the pn agent with the right url then ?

  12. Mike says:

    I have applied this procedure, and it works fine except for one detail. When called this way, the pass-through authentication doesn’t work and it prompts the user for a username and password. Is there something I am missing?

    • Do you have pass-through authentication turned on in the XenApp Services/PNAgent website? Does you have multiple authentication methods turned on? Is pass-through the default authentication method?

  13. Erwin says:

    Okay, so getting this Fix to work without an PNAgent and WI (only Program Neighborhood Client 10.0/10.2) is impossible, right?

  14. paul says:

    similar question to Erwin

    using xenapp 6.0 my clients cant open any docs via windows explorer. all office apps are streamed, ive linked profiles so can open between office apps, but how do you enable to open eg word doc from win explorer

  15. paul says:

    incorrect email address so had to resubmit as above

    • Simon Keneford says:

      Jarian,

      I hope you are still following this post. I have the exact same situation as is described here. I’ve attempted your solution. The only issue I have is I can’t get PNAgent to open via usrlogon.cmd or a GPO login script. The contents of my script is:

      Cmd /C “C:\Program Files (x86)\Citrix\ICA Client\pnagent.exe”

      echo %username% >> h:\logon.txt

      I know the script runs because it successfully writes the user name to that text file. It simply won’t open pnagent.

      I am running Win2k8 R2. Is there different syntax or something else that needs to be enabled to open PNagent from a login script.

      Note, I can successfully do this by publishing a batch file which opens PNAgent first then Explorer. But, as other users have seen, when I close the published explorer, pnagent stays open so the session never closes.

      Thanks
      Simon Keneford

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 35 other followers