Available actions

application

The application action is used to start an external application.

[Action]
01=<name> application "<application path>" <application arguments>
Example 1. application
[Action]
01=About application "%ProgramFiles%\NetiD\Client\netid.exe" -dialog about

parallel application

Add parallel to the application action to allow multiple application actions at the same time. It will not wait for the first action to finish.

[Action]
01=<name> parallel application "<application path>" <application arguments>

Examples

Example 2. parallel application
[Action]
01=About parallel application "%ProgramFiles%\NetiD\Client\netid.exe" -dialog about

runas

The -runas option executes an action as someone else. It is usually used if the SYSTEM service executes the action to be run as current user or session.

[Action]
01=<name> application "<application path>" <application arguments> -runas <name>

Examples

Example 3. Execute action as WinStation.

The WinStation name is a name that Windows associates with the session, for example, "services", "console", or "RDP-Tcp#0"

-runas {wts:win-station-name} (1)
1 Current winstation
Example 4. Execute action as user when user is SYSTEM.

If SYSTEM executes the command using the option -runas user, it is run as winstation name Console.

-runas user (1)
1 Same as -runas Console.
Example 5. Execute action as user when user is not SYSTEM.

If user, not SYSTEM user, executes the command using the option -runas user, it is run as that current user session winstation name.

-runas user (1)
1 Same as -runas {wts:win-station-name}.

close

The close action sends a close message to the specified window. If the window is not closed within 3 seconds, we try to terminate the process using kill.

[Action]
01=<name> close <window name>
Example 6. close
[Action]
01=Close close {string:1003} - {product-name}

kill

The kill action is used to terminate a process.

[Action]
01=<name> kill <process id> (1)
01=<name> kill <path> (2)
1 Terminate a single process specified with process ID.
2 Terminate all processes that uses a specified application path.

The command always terminates a process by using process ID. Thus, there will be a search for processes that uses a specific application path and then terminate when the path is the same.

To avoid infinite loops, the search for new processes to terminate is stopped if it is unable to terminate a process because of for example insufficient privlieges.

The kill action is the internal way to terminate a process. Usually, each platform has its own way to terminate processes, such as taskkill for Windows. Thus, another way to kill processes is to use the application action with the platform command.

Example 7. kill
[Action]
01=Kill kill %ProgramFiles%\NetiD\Client\netidapp.exe

lock

The lock action locks the current desktop session. Can be specified with the option active to only lock when logged on using our internal credentials, for example a certificate.

[Action]
01=<name> lock
01=<name> lock -active
Example 8. lock
[Action]
01=Lock lock -active

open

The open action is almost the same as the script action. The only difference is that the process is started visible, so the end-user can see the result.

[Action]
01=<name> open <script path>
Example 9. open
[Action]
01=Refresh open %ProgramFiles%\NetiD\refresh.bat

script

The script action is used to run any script without arguments, and will use the platform’s open action to start a new process. The result is almost the same as double-click on a file in the file explorer on respective platform. This makes sure that only scripts allowed by the platform are executed. The process is started silently, and thus invisible for the end-user.

[Action]
01=<name> script <script path>
Example 10. script
[Action]
01=Refresh script %ProgramFiles%\NetiD\refresh.bat

self

The self action calls the internal command line actions.

[Action]
01=<name> self <command>
Example 11. self
[Action]
01=About self -dialog about

self-force

The self-force action calls the internal command line actions, but without internal access control. See NameAllow and NameDeny.

[Action]
01=<name> self-force <command>
Example 12. self-force
[Action]
01=ClearCache self-force -cache clear

sleep

The sleep command pauses the current process for a specified time.

[Action]
01=<name> sleep <milli-seconds>
Example 13. sleep
[Action]
01=Sleep sleep 3000