OnEvent actions

Article:HOWTO50198  |  Created: 2011-04-18  |  Updated: 2011-09-26  |  Article URL http://www.symantec.com/docs/HOWTO50198
Article Type
How To


Subject


OnEvent actions

OnEvent entries let you trigger actions automatically when a layer's state changes. For example, you can play a sound when a layer is activated or run a program when a layer is deactivated. The following table explains all possible registry values, all of which are REG_MULTI_SZ types:

Table: OnEvent actions

Registry value

Function

OnPreActivate

Triggers an action before layer activation

OnPostActivate

Triggers an action after layer activation

OnPreDeactivate

Triggers an action before layer deactivation

OnPostDeactivate

Triggers an action after layer deactivation

OnPreImport

Triggers an action before layer import

OnPostImport

Triggers an action after layer import

OnPreExport

Triggers an action before layer export

OnPostExport

Triggers an action after layer export

OnPreReset

Triggers an action before layer reset

OnPostReset

Triggers an action after layer reset

OnPreDelete

Triggers an action before layer deletion

OnPostDelete

Triggers an action after layer deletion

OnPreCreate

Triggers an action before new layer creation

OnPostCreate

Triggers an action after new layer creation

OnPreCapture

Triggers an action before an application is captured to a layer

OnPostCapture

Triggers an action after an application is captured to a layer

  • For a global setting, place the value in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\FSLX\Parameters\FSL.

  • For a local setting, create the value in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\FSLX\Parameters\FSL\1, where '1' is the read-only (RO) layer number.

Layer numbers can be found by selecting Details from the View drop-down in the SWV Admin tool. The Sublayer info column lists both the read-only sublayer (RO) and the writable sublayer (RW) numbers.

For example, a user edits an HTML document and wants Notepad++ to always open when a layer containing Firefox is activated. The user can create a registry value named OnPreActivate with the value data 'C:\Program Files\Mozilla Firefox\Firefox.exe'. This value runs Firefox.exe before the layer is activated. If Notepad++ is also captured to the layer containing Firefox.exe, the registry value needs to be named OnPostActivate. Notepad++ is not available until the layer is successfully activated.

OnEvent actions can also be used with any layer operations that can be performed with SVSCMD command-line actions. For example, you want to reset a layer containing Firefox every time the layer is deactivated. You can add an entry named OnPostDeactivate with the value'svscmd.exe [layer GUID] reset'. The entry triggers a reset after deactivation.

If creating an onEvent action, the w tag can also be used to cause the action to wait until the indicated process is finished. For example, the registry value 'OnPreActivate' with the value data '"C:\WINDOWS\system32\notepad.exe"' runs Notepad.exe before it activates a layer. However, changing the value date to 'w,"C:\WINDOWS\system32\notepad.exe"' indicates that the layer does not activate until the Notepad.exe process exits.

Post events are triggered regardless whether the main action is successful or not. Post events occur for activate, delete, deactivate, create, and other main actions regardless of the result of the main action.


Legacy ID



v22940580_v57224467


Article URL http://www.symantec.com/docs/HOWTO50198


Terms of use for this information are found in Legal Notices