Double-hop configured with Citrix Workspace App inside a published desktop

Double-hop configured with Citrix Workspace App inside a published desktop

We started a new project with one of our clients creating a new MCS master with Windows Server 2016. One of their most critical business applications does not support Windows Server 2016 with their current version of the application. In the best of world, it would, we would just update the application, but sometimes this is just not possible or an option. One of our ideas to solve this was to create a second master with Windows Server 2008R2 and publish the application in the Windows Server 2016 start menu with Citrix Workspace App. I will guide you below on how we managed to get this to work very smoothly.

The first thing you will want to do is to install Citrix Workspace App on the Windows Server 2016 Master. If you installed Citrix Workspace App with the VDA-agent, you may skip this step. If not, you must install Citrix Workspace App using the below parameters:

CitrixReceiver.exe /includeSSON Enable_SSON=YES

After this you will want to create a new GPO, apply it to all your Windows Server 2016 Targets and configure the following settings:

When the user logs in we want Citrix Workspace App to start immediately and connect to the StoreFront. Since we are using redirected start menus for all users we published the following icon in the ”startup” folder.

"C:\Program Files (x86)\Citrix\Online Plugin\SelfServicePlugin\SelfService.exe" -ipoll

Starting Citrix Workspace App with the tag ”ipoll” will contact the server to refresh application details, but if no authentication context is available, prompt the user for credentials. You may read more about the Citrix Workspace App tags here.

The next thing you will want to do is to log in with a test user. Citrix Workspace App should now start for the user in the background and connect to the StoreFront. Log in as an administrator to the session host and browse to ”HKEY_USERS\{SID_FOR_TEST_USER}\Software\Microsoft\Windows\CurrentVersion\Uninstall”. You may now see all published applications as keys.

You’ll want to focus on the registry setting ”LaunchString”. Copy the value in ”LaunchString”. It should look something like below.

-launch -s CLIENT-64534ae2 -CitrixID "CLIENT-64534ae2@@XD-Controllers.APPLICATION" -ica https://storefront.CLIENT.se/Citrix/CLIENT/resources/v2/WEQtQ29udHJvbGxlcnMuSUJTIFhUIENsaWVudA--/launch/ica -cmdline

This string is unique for every application. This string is not unique for every user. We will want to use this string with Citrix Workspace App.

"C:\Program Files (x86)\Citrix\Online Plugin\SelfServicePlugin\SelfService.exe" -launch -s CLIENT-64534ae2 -CitrixID "CLIENT-64534ae2@@XD-Controllers.APPLICATION" -ica https://storefront.CLIENT.se/Citrix/CLIENT/resources/v2/WEQtQ29udHJvbGxlcnMuSUJTIFhUIENsaWVudA--/launch/ica -cmdline

The optimal would of course be to publish a shortcut in the redirected start menu, but since the string is too long the shortcut is capped with max characters. We must therefore create a script like below.

<#
    .NOTES
        Name: CTX-VDA-A-CR-Application.ps1
        Author: Måns Hurtigh, Xenit AB
        Date Created: 2018-06-27
        Version History:
            2018-06-27
            - Initial Creation
#>
[cmdletbinding()]
Param(
    [string]$CitrixWorkspaceApp = "C:\Program Files (x86)\Citrix\Online Plugin\SelfServicePlugin\SelfService.exe",
    [string]$Store = "CLIENT-64534ae2",
    [string]$ApplicationID = "CLIENT-64534ae2@@XD-Controllers.APPLICATION",
    [string]$ICA = "https://storefront.CLIENT.se/Citrix/CLIENT/resources/v2/WEQtQ29udHJvbGxlcnMuSUJTIFhUIENsaWVudA--/launch/ica"
)
Begin{
}
Process{
    	& $CitrixWorkspaceApp -launch -s $Store -CitrixID $ApplicationID -ica $ICA -cmdline
}
End {
}

Browse to the redirected start menu and create a shortcut with a target like below.

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe "%CTXFSROOT%\Scripts\CTX-VDA-A-CR-Appliation.ps1"

When the user logs in to the session and launches the application it should start from the Windows Server 2008R2 machines like below.

Hope this works as well for you as it does for me. Give me a comment below if you have any problems.