Making it Simple to Demonstrate Different Scenarios and Toggle Between Different Environments

Here’s a post by RES product manager Grant Tiller with some great tips on creating an efficient demo environment to really demonstrate the full functionality of RES Software. These steps can help RES partners more effectively demo our software while working on a single laptop. IT pros can also use this as a guide to show the software’s capabilities to their peers and managers.

I am frequently asked to demonstrate a variety of different scenarios when I am out talking to customers. There is a limit to what I can do with one laptop, so I created a way to toggle between different environments quickly and easily. This means I can demonstrate Workspace Manager to its full potential without the need to carry a van full of equipment. RES Software Partners can also look to take advantage of this functionality when demonstrated Workspace Managers to customers.

Stage One – Creating Managed Applications to launch a Remote Desktop

In my test environment, I am running both Citrix and terminal services, so we need to create two Managed Applications from the RES Workspace Manager console:

Let’s start with the Citrix Desktop. Point the command line to wfcrun32.exe, and the parameter should point to the .ICA file (I use the Workspace Manager datastore to distribute the ICA file.) When you have saved this, make a note of the Managed Application ID:

Under settings, the Managed Application is enabled, but it is set as hidden, and does not appear in help or as a new application. This is because I do not want a shortcut to appear in the user’s session, and I do not want my user to interact with it in any way:

The second option in my environment is a Terminal Server desktop connecting via RDP. The command line is pointed to mstsc.exe Once again, I am leveraging Workspace Manager’s ability to distribute my .RDP file. Make a note of the Managed Application ID:

Again, the Managed Application is enabled but is hidden from the user’s view:

Stage Two – Launching a Session or a Local Desktop


Not many people use this function within Workspace Manager, but it’s truly a diamond piece of functionality – one of my favorite things in RES Workspace Manager! Basically it allows us to launch an application instead of a desktop when a user logs on. The offline option is left unchanged, as in my scenario, the user will always launch a full desktop when they are not online (for example, a laptop user with no connectivity):

Rather than calling a Workspace Manager application ID, I am instead referencing an Environment Variable called %Online%. I have elected to launch this prior to all other actions – this is because mappings, registry changes and setting policies etc… can take place in the background. It means that users are not inconvenienced with having to wait at logon time… and we know that user perception is key when it comes to acceptance!

Stage Three – Defining Locations and Devices


The next step is to create some zones – this will allow us to automatically detect the availability of our remote desktop infrastructure. The desired state in my environment is reliant on three different zones:

The first zone is called remote host ICA & RDP Disabled:

It is based on one of the new rules Remote host/URL. Using the & button, I am checking to ensure that both the ICA listener (port 1494) and the RDP listener (port 3389) are not reachable.

The second zone is called remote host ICA Enabled:

Based on the Remote host/URL rule, I am ensuring that the ICA listener (port 1494) is reachable, and using the & button I am also confirming that the RDP listener (port 3389) is not reachable:

Finally the third rule is called remote host RDP Enabled:

Based on the remote host/URL rule, I am ensuring that the RDP listener (port 3389) is reachable, and using the & button I am also confirming that the ICA listener (port 1494) is not reachable:

Stage Four – Defining Workspace Containers


We also need to define some Workspace Containers because we will be applying different configuration based upon the device type. This could be achieved by creating more zones under Locations and Devices, but Workspace Containers will be used elsewhere, so the chances are that these have been defined already:

The first Workspace Container is named Citrix/Terminal Server/VDI:

The Citrix Server and Terminal Server (named SERVER in this example) is a member:

The second Workspace Container is named XP Workstations:

The Workstation (named CLIENT in this example) is a member:

Stage Five – Creating Environment Variables


The next step is to create some environment variables to define the Online state that we reference in Stage Two. I have set up four variables all with the same name, Online. Three variables apply to the workstation and dictate whether to launch a local or remote desktop, and a fourth variable for Citrix and Terminal Server.

So first of all, we’ll create a variable to launch a local desktop on the Workstation. This is for when the Citrix or Terminal Server is not reachable. The Value is blank, which means RES Workspace Manager runs as normal. Required connection state is Online only:

Access Control makes it available to all users, and Locations and Devices is referencing the remote host ICA & RDP Disabled zone that we created in Stage Three:

This is applied to the XP Workstations Workspace Container:

The second variable calls Managed Application ID 121 as defined in Stage One. This is to launch a Citrix desktop for when the Citrix server is reachable. Required connection state is Online only:

Access Control makes it available to all users, and Locations and Devices is referencing the remote host ICA Enabled zone that we created in Stage Three:

This is applied to the XP Workstations Workspace Container:

The third variable calls Managed Application ID 122 as defined in Stage One. This is to launch an RDP desktop for when the terminal server is reachable. Required connection state is Online only:

Access Control makes it available to all users, and Locations and Devices is referencing the remote host RDP Enabled zone that we created in Stage Three:

This is applied to the XP Workstations Workspace Container:

As mentioned before, the fourth variable is kind of a loopback variable which applies to the Citrix and Terminal Server. It stops things from going into a never ending loop, or throwing an error unnecessarily: The Value is blank, which means RES Workspace Manager runs as normal:

Access Control makes it available to all users, and Locations and Devices is blank:

This is applied to the Citrix/Terminal Server/VDI Workspace Container:

Stage Six – Toggling Citrix and Terminal Services on and off


This is not a stage you would need to implement in a live scenario, because once it is setup, that’s the way it will stay, and the state of the remote desktop and whether it is reachable or not would dictate whether the user is connected to a remote or local session.

However, for demonstration purposes, it is nice to be able to easily toggle between different scenarios. I have toyed with several ways of achieving this. Of course you can use RES Automation Manager and even better  RES Service Orchestration to achieve this, but typically in a demonstration scenario you want immediate results, rather than having to wait for the 30 seconds it takes for a runbook to be executed.

There is no really slick way to do this, but for demonstration purposes, I came up with the idea of creating three icons in the Quick Launch area. They are local desktop, Citrix desktop and Terminal Server desktop:

When they are clicked, each one runs a different .reg file (they are set to run minimised to keep things tidy) The local desktop icon calls a .reg file called OFF, which sets EnableWinstation for both ICA and RDP to zero (disabled)

The Citrix desktop icon calls a .reg file called ICA, which sets EnableWinstation for ICA to one (enabled) and RDP to zero (disabled)

The terminal server desktop icon calls a .reg file called RDP, which sets EnableWinstation for RDP to one (enabled) and ICA to zero (disabled)

It is important to note that when you boot your Citrix/Terminal server, the values should be set to one, in order to prevent Citrix and terminal server license errors and many other errors. I achieve this with a fourth .reg file called ON which sets EnableWinstation for both ICA and RDP to one (enabled)

This .reg file is called on my server at boot time through the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run. I have named the string aaListeners to make sure it appears at the top of the list:

Once again, the .reg file is called with the /s switch, which will merge the file in to the registry, suppressing the standard “Are you sure?” and “File merged” dialogue boxes:


This is a really neat and quite simple way to demonstrate some of the advance functionality of Workspace Manager.

Good Luck!

Posted in Product News & Insights and tagged , , , , , .

3 Comments

  1. Good post, but i’ve got a problem when i’m starting my Citrix Connection like this.

    After connecting to the server, my session gets ended directly….
    It looks like it has got to do with the ‘Online Application Properties’. When the application is ended before and/or after the time-out, the session is logging off.

    Any ideas?

  2. A couple of quick checks you can do to help get to the bottom of your issue:

    1) does it work with RDP? if it does, we can determine it is a Citrix configuration issue.

    2) have you enabled security in Workspace Manager? If Read Only Blanketing and File & Folder security are enabled, are you seeing anything in the security logs? (for example, is WFCRUN32 trying to call WFICA32 but getting access denied?)

    3) does the ICA file you created work with no problems? (for example if you double click it from an unmanged desktop, does your session launch with no problems?)

    I think that if you can determine where you are with these three points, you will be well on your way to a working solution!

    Hope this helps,

    Grant

  3. Hi Grant,

    Thanks for getting back to me.

    1) It works with RDP
    2) Security is disabled, so that can’t be the problem
    3) My sessions launchs without problems when i use the program from the startmenu or via the Citrix Plugin….

    Is there something else i could check?

Leave a Reply