I’ve had this thought quite often, that it would be useful to have a “baseline” library of Environment Manager Reusable Nodes and Reusable Conditions to import into new configurations, and then simply delete or disable those that you don’t require. So why not – let’s do it! However – I need your help, because this configuration is intended to be “live”, i.e. I really want a lot of people to contribute all their useful bits of configuration, to make this a really good resource. So…please don’t post comments saying “you should have included x” – instead, drop me the details of whatever x is and I will include it in the configuration library with a relevant credit. It would also help if you could include an example of the trigger and the situation in which you’ve used the Node or Condition.
The downloadable configuration is available here and there’s also a link at the end, but we will also run through each part of the library in turn so that you can understand exactly what each item does. Some are fairly self-explanatory, whereas others require a little more detail.
If you download it and import it, you will see that at time of writing that I’m pretty short on content! So let’s make this a real community effort – dig out your Nodes and Conditions that you find useful, traditional or scripted, and let’s put them all together in one central location to share the tricks and shortcuts that we’ve found.
Reusable Nodes
The Reusable Nodes are sets of Conditions and/or Actions that can be used to achieve a particular task, either by direct links in the configuration or through the use of Node Groups. They can be referenced as many times as required throughout the configuration.
Set user SID as variable
Nice useful trick from AppSense themselves here – an elegant way of retrieving the user SID from the Registry. The SID is normally used to then set a local profile to temporary (see the next item) in order for the local profile to be purged at logoff. This trick was discussed in this previous post – however this Reusable Node offers a much better way of achieving the “profile flip” than the VBScript mentioned in the original post.
Set local profile to temporary
Best done in the Logoff trigger, this ensures that a local profile will be purged by setting the state of the profile to that of a temporary one.
Disconnect session
Also best done in the Logoff trigger (for obvious reasons!), this disconnects the user’s session as it logs off, giving the impression of a quicker logoff time. It was discussed in this previous post.
Set online/offline status
It makes sense to use this Node in the Computer Startup, Network Connected and Network Disconnected triggers (as discussed in this previous post). It writes a flag to the Registry defining whether the client is connected to the corporate network or not.
Check desktop folder size
A nice one provided here by Michael Ruefli (www.miru.ch) which shows a warning if the user’s Desktop folder size is over a certain threshold (30MB in the example provided).
Set Desktop background
Provided by Andrew C, this shows that even very straightforward stuff can be useful – simply setting a particular image as the Desktop background for the user and centring it.
Set Office version as variable
Don’t know where I came across this one (probably from Richard Thompson), but this uses the version of Outlook which is installed to set a variable identifying the version of Office in use. You can probably alter this one to use other programs if needs be.
Identify chassis type
Discussed in this post, this If Else Group uses a WMI query to indentify the chassis type and then set a custom Registry key to flag it. This Reusable Node is required for the two Reusable Conditions below (Detect Laptop and Detect Desktop) to function correctly.
Flag connecting client OS / unflag connecting client OS
Discussed in this post, these Reusable Nodes use ctxclios.exe to write the client device OS into a Registry key, and to remove it when the session disconnects or is logged off. Note that the path to ctxclios.exe is hard-coded into the PowerShell and will need to be adapted for your own environment.
Set Session ID / remove Session ID
Discussed in this post, these Reusable Nodes were used to write (and then erase) the Citrix Session ID of a user session to an environment variable.
Legal Notice
Discussed in this post, this Reusable Node sets the LegalNoticeText Registry entries with correct formatting.
Wait for network
Provided by Michael Ruefli, this node ensures that the corporate network is accessible so that network-dependent Actions can execute.
Reusable Conditions
The Reusable Conditions are simply Conditions or groups of Conditions that can be referenced multiple times within a single configuration.
OS conditions
Nice and simple this – there is a set of OS Conditions which detect the operating system of the system the user is connected to.
Architecture conditions
Again, very straightforward – this Condition differentiates between x86 and x64 architectures.
Terminal services conditions
Some more simple ones – identifying whether the system is TS/RDS-enabled or not. Very useful for separating XenApp/RDS systems from traditional non-SBC clients.
Check if vDisk in Private mode
As discussed in this previous post, this simply checks whether a Citrix Provisioning Services vDisk is in Private mode.
Check if vDisk in Standard mode
And this simply does the opposite (more or less) to the above, checking if the PVS vDisk is in Standard mode (any flavour of Standard).
Check if XenDesktop
This verifies whether the endpoint is a Citrix XenDesktop virtual machine.
Check if battery is present
This used to be very useful for identifying laptops, but with the advent of tablet devices it is possibly becoming a bit less relevant. I’m working on some scripts to identify client systems (watch this space!), but for the moment you may be able to get some mileage from this.
Detect laptop
This uses the Registry key written in the Identify Chassis Type Reusable Node to flag a machine as being a laptop.
Detect desktop
This uses the Registry key written in the Identify Chassis Type Reusable Node to flag a machine as being a desktop.
User session runs XenApp 6.x / machine runs XenApp 6.x
These Conditions detect whether a machine or user session is running on Citrix XenApp version 6.x
And that’s all I seem to have for the moment (although I am working on some client identification stuff, hopefully to be added very soon!) So come on, send me your snippets of Nodes and Conditions and hopefully we can turn this little library into a really good resource for building AppSense Environment Manager configurations.
The configuration, as mentioned earlier, is available for download here.