File Type Associations for Published App-V Applications

This blog post describes what is necessary for using file extensions or file type associations (FTA) for published App-V applications. The focus is on XenApp, but in theory the same steps and methods should also work for XenDesktop.

The Basics

Before I begin on the App-V part, let me first explain the basics.

XenApp uses the available registered FTA’s on the servers where the published applications are managed.

If you select “Show all available file types for this application” you can see which file types are available for the C:\Windows\System32\Notepad.exe executable.

If you want to add a file type to be available to Notepad.exe simply execute the following two commands.

ftype notepad_test=”C:\Windows\System32\Notepad.exe”

assoc .test=notepad_test

To have the .test file type available in XenApp for the application Notepad.exe, make sure you “Update the file types from registry” within the Citrix AppCenter console and on or for the server where you just added the file type.

When you now look at the available file types for the published application Notepad (C:\Windows\System32\Notepad.exe), you can see that the file type .test is available, and can now be used as a FTA for the published application.

The command line for the published application automatically gets changed from

C:\Windows\system32\notepad.exe

To

C:\Windows\system32\notepad.exe “%*”

 

Published App-V Applications

Before we begin on the published App-V applications part, let me first explain the problem that will be solved.

In a published desktop scenario, when the user logs on to the published desktop, the App-V client normally triggers a refresh, and the available applications and FTA’s are presented/made available to the user within the published desktop. The FTA integration of App-V takes care of files that can automatically be opened with the correct application within the published desktop.

In a published App-V application scenario, when the user logs on to the published App-V application, the App-V client also normally triggers a refresh, and the available applications and FTA’s are presented/made available to the user within the published App-V application. The FTA integration of App-V takes care of files that can automatically be opened with the correct application within the published application. Nothing different from the published desktop scenario.

At my current customer users use a BYOD mobile work style concept. This means that they have their own laptop or one provided by the company. That means that they have local applications and sometimes also local data or data available from mapped network drives. Let’s focus on the local data or the data from the mapped network drives. Let’s say for example that the user has some .sav files on their laptop for the application PASW Statistics.

The published PASW Statistics App-V application is available from the SBC environment. By default, if a user double-clicks a .sav file, the user is asked which application to use to open the .sav file.

This all still makes sense, because nothing has been configured yet that associates the .sav file with the published PASW Statistics App-V application.

So let’s check the configuration of the published PASW Statistics App-V application.

The published application uses the executable sfttray.exe from the command line “C:\Program Files\Microsoft App-V Client\sfttray.exe” and looks up the available file types for this executable.

The only available file extension is .SoftGrid.SFTTRAY.

If we execute the assoc command on a server with the App-V client installed, we find the following entry.

.SoftGrid.SFTTRAY=SoftGrid.SFTTRAY

If we then execute ftype on that same server, we find the following entry.

SoftGrid.SFTTRAY=”C:\Program Files\Microsoft App-V Client\sfttray.exe”

The sfttray.exe executable matches the executable from the command line in the published application. This is reason we see the .SoftGrid.SFTTRAY file type available.

So now back to the published PASW Statistics App-V application. If we want to make the .sav file extension available and associate it with the published PASW Statistics App-V application we need to do the following.

On a server where you have XenApp installed and manage your published applications execute the following command.

Ftype AppV_sav=sfttray.exe

Or

Ftype AppV_sav=”C:\Program Files\Microsoft App-V Client\sfttray.exe”

Then execute the following command.

Assoc .sav=AppV_sav

Update the file extensions from the registry within the Citrix AppCenter Console.

Open the properties for the published PASW Statistics App-V application.

The .sav file extension is now available and can be associated with the published PASW Statistics App-V application.

When the .sav file extension has been selected and Apply has been clicked, the command line for the published PASW Statistics App-V application is automatically adjusted to

“C:\Program Files\Microsoft App-V Client\sfttray.exe” /launch “PASW Statistics 18 18.0.0.282” “%*”

When the the user is now connected through the Citrix PNAgent/Receiver. The .sav files are automatically associated with the published PASW Statistics App-V application on the user’s device.

 

Example Script (PowerShell)

#provide comma seperated file types
 
#example: txt,ini
 
[string]$FTA = $args[0]
 
$vars = $FTA.Split(" ")
 
ForEach ($var in $vars)
 
{
 
    Add-Content -Value "Creating file type association for file extension: $var" -Path "$env:s4_cache\WorkFolder\Logs\CreateFTA.log"
 
    #fix to keep prevent command break up
 
    $newvar = 'ftype AppV_' + $var + '="C:\Program Files\Microsoft App-V Client\sfttray.exe"'
 
    cmd.exe /c "$newvar"
 
    #fix to remove space
 
    [string]$varnew = "." + $var
 
    cmd.exe /c assoc $varnew=AppV_$var
 
}

You may also like...

1 Response

  1. Mark says:

    Great article, helped us a lot. Thanks for it and keep on posting!

Leave a Reply

Your email address will not be published. Required fields are marked *