Scense Administrator Guide

⌘K
  1. Home
  2. Docs
  3. Scense Administrator Guid...
  4. Actions

Actions

Introduction to Actions.

Actions are the ‘hands and feet’ of the Scense Runtime system and can be created within Session Events. The sequence in which actions are put also determines the runtime sequence of the actions.
Actions can be activated and deactivated by checking or unchecking the box in front of the action.
Although Scense Executive will always execute a complete Session Event, it is possible to test a single action within Scense Explorer, even if the action is deactivated.

Action Types.
The following Actions are available for the executions of tasks:

 

Document
The document action enables the generation of File Type Associations (FTA).These can be ‘normal’ FTA’s, or FTA’s to TaskSets.
Using parameters, variables can be passed to a Taskset before it is started.
Environment
Environment actions are used to set and remove Environment Variables. Those can be user variables or system variables.
To make sure the variable is available not only for the current program, but also for all other programs (to be started), the variable can be propagated to the operating system. (check Propagate).This action first evaluates the variable’s current value. If the current value already equals the specified value, no further steps need to be taken, which saves time.
File
File actions make it possible to copy, re-name and remove files and folders.It is also possible to change a file’s attributes.
Message
It is possible to send the user a message during the execution of tasks.The separate program ‘Scense_MsgBox.exe’ makes it possible to send the user a reboot message with the Scense look and feel.
Network
The network action enables the creation and removal of network drive connections.When a network connection has to be created, the action will first determine whether the network connection concerned already exists as specified. If this is the case, no further steps will be taken.
If a connection with the drive letter concerned exists, but the specified network location does not, the existing connection is removed and a new connection to the specified network path is created.
Should this action fail, the situation will be restored to its previous state.Network connections are always made ‘persistent’, unless a User ID and Password are specified. This avoids the user being asked to enter a password the next time he/she logs on.
OnDemand
The OnDemand action is used to trigger the Scense OnDemand service to execute a Taskset.It is possible to wait for the background processes to finish.Normally the Scense OnDemand service directly starts executing the task, but it is possible to schedule a task to be executed at the next reboot.
Process
The Process action is used to start any program, URL, UNC or document.It is possible to define the priority with which the program should be started, and how the first window should be shown.
It is also possible to wait until the program terminates, which may be forced after a certain amount of time.The ‘Run as administrator’ option works with UAC on Windows 7 and above and implements the default ‘RunAs’ functionality on Windows XP.
Registry
The Registry action is used to manipulate the registry.Keys and values can be written in and removed from every hive, depending on authorizations.
When entering ‘(Default)’ in the ValueName field, Scense will use the default value of a registry key.The Registry Mode can be used to direct Scense into using the registry in a specific way. Choosing ‘Default’ will let Scense determine the Registry Mode based on the current (application) context.
Shortcut
The shortcut action enables the generation of shortcuts.These can be ‘normal’ shortcuts, ‘enhanced’ or shortcuts to TaskSets.
Using shortcut parameters, variables can be passed to a Taskset before it is started.Shortcuts can be imported using the import button.
Scripting
The scripting action is used for all remaining operations that cannot be achieved by standard actions.The scripting action supports the VBScript- as well as the JScript language.
Within a script internal Scense objects can be used as ‘native language elements’, although it is possible to use any other scriptable (external) object.
The Scense script engine does demand a ‘Scense_Main’ procedure, which will be started as the main routine.Besides the standard scripting syntax objects, it is possible to use Scense additions like:

  • WriteScenseLog: writes text in Scense Executive logging
  • ReplaceVariables: is able to replace all variables known within Scense by their value.
  • ScenseExecute: executes internal Scense commands, e.g. ‘RebuildShortcuts’ or ‘ReconnectNetwork’
  • Wait: makes it possible to wait a certain amount of time (in seconds).
  • Etc.

For more info about Scense embedded scripting and “Custom Action headers” see: “Scense Embedded Scripting Guide”

Printing
The printer action allows connecting or disconnecting to or from a network printer. There is an option to define the printer as “default printer”.
Service
The Service action makes it possible to start, stop or restart a Windows service.In the ‘servicename’ field, the internal service name has to be entered. The browse function enables comfortable browsing for a service, even on remote computers.
Taskset
The Taskset action makes it possible to start any Session Event within the ‘current’ one.The Session Event will be nested in the calling Session Event. As a consequence Scense will wait for its completion before finishing the calling Taskset. UserDefined events can be started with the Taskset action as well.The ‘Asynchronous’ checkbox will direct the Scense runtime to start the Session Event in a new process instead of nested.

In this scenario the main execution will continue immediately after spawning the new process. This will effectively make the two tasks run simultaneously and make good use of multi-processor computers

 

Runmode.

Every action is automatically assigned a RunMode definition, the default definition being ‘Any Condition’.

If an action needs to be executed only in special cases, it has to be assigned a different RunMode.

 

Raise Error.

It is possible to intercept environmental errors. For every action it can be specified whether or not an error should be passed to the Session Event runtime environment.

(See Troubleshooting…)