Environment Manager powered by AppSense

Triggers

In this section:

About Triggers

Triggers in the Environment Manager console represent common computer and user events such as Startup, Logon and Session Disconnected. They are static elements in the Policy Configuration navigation tree; they cannot be edited, moved or deleted. An Environment Manager configuration is built around the events to which the triggers relate. Nodes are created within triggers containing conditions and actions. This creates a dependency between the trigger, condition and action. When the trigger is fired, any conditions present are validated and if met, the action is carried out.

For example:

Trigger Condition Action
Computer Startup Computer > Computer IP Address File & Folder > Modify File Attributes

In the example below, the "Hidden" node, which contains a condition and associated action, has been added to the Startup trigger. When a managed endpoint is booted up, the Environment Manager agent checks to see if the IP address is between 100.100.100.100 and 123.123.123.123. If it is, the Word document Test.docx becomes a hidden file. If the endpoint does not meet the condition, the Word document properties remain unchanged.

Trigger Example

When selected, each trigger, displayed in the work area, contains two tabs: Environment and Summary. The Summary tab contains an overview of the contents of the trigger, showing each node, its state (enabled or disabled) and the number of associated actions.

Triggers fall under two fixed nodes in the Policy Configuration navigation tree; Computer and User.

Computer Triggers

Trigger Description
Startup Executes actions when a computer is started. Useful to help create a common image for all standard computers within an organization.
Network Available Actions execute once the network is available. This is useful for items such as conditions that perform AD lookups or actions that copy files from network locations. These items may not function correctly in the Startup trigger as the network is not always available at that point.
Shutdown Executes actions when a computer is switched off.
Process Started Actions within this trigger are executed when a process is started.
Process Stopped Actions within this trigger are executed when a process is stopped.

User Triggers

Trigger Description
Logon Actions take effect when the user logs on to the system but before the desktop shell has started.

Due to a compatibility issue with smart card readers, logon actions do not run when logging on with smart cards. This affects Windows 7 and Windows 2008 R2 operating systems.

Logon > Pre-Session Actions take effect before terminal services is notified of the logon. Registry, Group Policy and Environment actions are compatible with this sub-trigger. During the upgrade, actions which were previously in the Environment tab of the Logon trigger are moved here.
Logon > Pre-Desktop Actions take effect when the user logs on to the system but before the desktop shell has started. During the upgrade, actions which were previously in the Logon trigger are moved here.
Logon > Desktop Created Actions take effect after the desktop shell and Explorer has started. To improve efficiency and logon times, any non-critical Logon actions should be added to this trigger, for example, mapping drives and printers.
Logoff The associated actions are executed when a user logs off. Environment Manager Logoff actions run after Group Policy scripts and all post-logon actions have completed. Following a forced logoff post-logon actions still run to completion followed by any Logoff actions.

If using Remote Desktop Protocol v6.0, use the Session Disconnect trigger for logoff actions as the remote application procedure does not logoff, it disconnects.

Process Started Actions within this trigger are executed when a process is started.

If using Environment Manager and Streamed Applications, refer to Streamed Applications.

Process Stopped Actions within this trigger are executed when a process is stopped.
Network Connected Actions and conditions within this trigger are executed when each physical or virtual network adapter establishes a connection. If a Personalization Server is defined within the configuration, a Personalization configuration poll is also performed when the trigger is fired. The trigger fires when a network is detected. The trigger will not fire if the network is categorized as “unknown”.
Network Disconnected Actions and conditions within this trigger are executed when each physical or virtual network adapter disconnects a connection. The trigger also fires when the network is categorized as “unknown”. For example, this could be because the domain controller has stopped functioning or the wireless connection is out of range.
Session Reconnected Actions within this trigger are executed when a user’s disconnected session is reconnected.
Session Disconnected Actions within this trigger are executed when a user’s live session is disconnected.
Session Locked Actions within this trigger are executed when a user’s desktop is locked.
Session Unlocked Actions within this trigger are executed when a user’s desktop is unlocked.

Session Locked and Session Unlocked triggers will not apply to published applications. They only apply to the session in which the application is running.

Triggers for XenDesktop Connections and Backwards Compatibility

Prior to Environment Manger 10.1, when using XenDesktop versions 7.8 or earlier, if you logged on, disconnected , reconnected, locked, and unlocked, the following triggers were fired:

User Behavior Actual Trigger (RDP) Actual Trigger (ICA)
Logon Logon Logon
Disconnect Disconnect Lock
Reconnect Reconnect Unlock
Lock Lock Lock
Unlock Unlock Unlock

This was because for ICA sessions , Lock and Unlock actions were triggered when the user disconnected and reconnected. This behavior is corrected for XenDesktop 7.9 and later, but for users running earlier versions, Environment Manager can now detect disconnections and reconnections in XenDesktop 7.6 - 7.8 environments. This detection is enabled by default for version 10.1 configurations. When upgrading older version configurations (version 10.0 and older), the detection mechanism is disabled by default. If you are using XenDesktop versions 7.6 - 7.8 inclusive, you can override this using the IcaSessionConnectionOverride setting in Advanced Settings.

Logon Trigger

In Environment Manager 8.5, a new Logon trigger structure was introduced. The single Logon trigger and Environment tab was replaced by three sub-triggers - Pre-Session, Pre-Desktop and Desktop Created.

A new configuration opened in the 8.5 console uses the Logon sub-triggers. However to ensure backwards compatibility, when upgrading a configuration you can select whether to use the new or old logon trigger methods. You can switch between methods using the Advanced Options in the Manage tab.

Process Start and Stop Triggers

When creating top level nodes within both Computer and User Process Start and Stop triggers, different behavior applies:

  • Nodes must have a Process Name condition applied - When adding a node to a Process Start or Stop trigger the Process Name condition dialog box is automatically displayed. A condition must be specified for the node. Pressing Cancel deletes the node.
  • Actions and conditions can only be added by selecting the process condition within the work area. Unlike other triggers, actions and conditions cannot be added by highlighting the trigger in the navigation tree. The exception to this is other Process Name conditions which can be added by selecting the process trigger.
  • The initial Process Name condition cannot be deleted from within the node. To remove, the node must be deleted.
  • Stop if fails cannot be disabled for the Process Name condition. If the condition fails, nothing within the condition will run.
  • Any reusable node can be added to a Process Start/Stop trigger proving the actions contained are compatible with the trigger.
  • When entering an application into the Match field, the file extension must be added; calc does not work but calc.exe does.
  • Prior to 8.1 a Process Name condition did not have to be applied to a Process Start/Stop trigger. On upgrade, any actions and conditions are still created but in the absence of a Process Name Condition, all top level actions and conditions in node will run for every process that starts during the user/computer session. This could have a detrimental effect on performance.
    To ensure performance is not affected, add a process name condition and add the existing actions and conditions.

These behaviors do not apply to child nodes created in Process Start and Stop conditions.

Computer Process Start and Stop triggers only detect system processes and User Process Start and Stop triggers only detect user processes.

Network Triggers

The Network Connected and Network Disconnected triggers fire when each individual network adapter connects or disconnects.

Session Variables can be used within the Network Available, Network Connected and Network Disconnected triggers to determine attributes of the network connection. The built-in Session Variables persist for the duration of the network trigger and will not be available after the trigger has completed executing all of its nodes.

The following built-in Session Variables are available on the Network Available triggers:

Session Variable Description Example
Network.Domain DNS suffix of the adapter, specific to the connection. Note: This is the domain name of the connection, rather than the domain to which the machine is joined. domain.local
Network.DomainType Domain type of the connected network. The possible values are as follows:

0 - Workgroup machine connected to a private network

1 - Workgroup machine connected to a domain network

2 -  Domain-joined machine connected to a domain network

2
Network.Id GUID to uniquely identify the network. {9A445C40-B550-4B79- 8F4F-94475BCB5FCA}

The following built-in Session Variables are available on the Network Available, Network Connected and Network Disconnected triggers:

Session Variable Description Example
Network.Domain DNS suffix of the adapter, specific to the connection. Note: This is the domain name of the connection, rather than the domain to which the machine is joined. domain.local
Network.DomainType Domain type of the connected network. The possible values are as follows:

0 - Workgroup machine connected to a private network

1 - Workgroup machine connected to a domain network

2 -  Domain-joined machine connected to a domain network

2
Network.Id GUID to uniquely identify the network. {9A445C40-B550-4B79- 8F4F-94475BCB5FCA}
Network.Adapter.BSSID Media Access Control (MAC) address of the access point. 6E:DD:3A:91:F2:8D
Network.Adapter.Description Description of the network adapter. This is usually the manufacturer or type of the network adapter Intel(R) 82577LC Gigabit Network Connect
Network.Adapter.FriendlyName Friendly name of the network adapter This is the name of the adapter as displayed in the Network and Sharing Center. Local Area Connection
Network.Adapter.Id GUID to uniquely identify the network adapter. {F2DD3B93-5BD8-489CA7C7-32E2964AA0D5}
Network.Adapter.IPv4Address IPv4 address of the network adapter. 192.168.1.1
Network.Adapter.IPv4SubnetMask IPv6 address of the network adapter in a shorthand notation

If the network is not an IPv6 network, then the address is a local-link address starting “fe80:” and is non-routable.  

255.255.255.0
Network.Adapter.IPv6Address IPv6 prefix length of the network adapter 64
Network.Adapter.IsVirtual Returns True if the network adapter is software-based or False if the network adapter is physical. True
Network.Adapter.IsWireless Returns True if the network adapter is IEEE 802.11 wireless or False if the network adapter is wired. False
Network.Adapter.MAC Media Access Control (MAC) address of the network adapter. 3D:C5:DB:AC:46:B6

Trigger Environment

The trigger Environment optimizes efficiency when running configurations containing Environment actions. Prior to version 8.1, environment variable actions were added to nodes in the same way as other actions. When environment variables were run in this way, environment refreshes had a potential impact on the running of the other actions in the trigger.

It is recommended that all environment and session variables are added to the required trigger environments when upgrading a configuration to from a pre-8.1 version to 8.1 or later.

Environment actions which are in nodes within a trigger will not run or be refreshed until after all the other actions in that trigger have run.

Actions within the Environment tab will not execute unless a node exists within the trigger.

The trigger environment behaves in much the same way as nodes in that any condition appropriate to the trigger can be added. However, only Environment actions can be added; all other actions are unavailable for selection.

The trigger Environment is available for the following triggers:

  • Computer
    • Startup
    • Network Available
    • Shutdown
  • User
    • Logoff
    • Network Connected
    • Network Disconnected
    • Session Reconnected
    • Session Disconnected
    • Session Locked
    • Session Locked

The example below shows the Startup Environment tab containing one condition with an Environment action and three further Environment actions.

Trigger Environment Example

Configure the Trigger Environment

  1. In the Policy Configuration navigation tree, select a trigger.
  2. Select the Environment tab.
  3. Select the Conditions tab and add any required conditions. It is not mandatory to use conditions in the environment tab; Environment actions can be added directly.
  4. Click Actions > Environment and select the required action:
    • Set Environment Variable
    • Append Environment Variable
    • Delete Environment Variable
    • Set Session Variable
    • Delete Session Variable

Related Topics


Was this article useful?    

The topic was:

Inaccurate

Incomplete

Not what I expected

Other