1.2 Execution Context

Scripts execute in either the System context or the User context. The execution context is defined in the Scripting policy through the Run As setting.

The script context, along with the operating system, determines the rights provided to the script and the functions it can perform. For example:

  • On Windows Vista and newer Windows operating systems, a script running in the System context (Session 0) cannot display messages on its own. To display messages, the script must use the Action.DisplayMessage methods or another mechanism. However, on Windows XP, scripts might be able to perform direct dialog displays.

  • Scripts running in the User context execute with the right of the user session.

  • Scripts running in the System context have the same rights as Windows services.