Help Center

Custom session scripting

Execute custom server-side scripts (vbs/bat/exe/ps1) during Cameyo sessions.

Cameyo allows you to execute scripts on your servers backend side. This can be done by creating a Cameyo directory under ProgramData or the user's profile, and naming the script accordingly.

Quick start

  • Connect to your Cameyo server as admin.
  • Create on it a directory C:\ProgramData\Cameyo
  • Within this directory, create a VBS or BAT file called StartupBefore.vbs or StartupBefore.bat.
  • This script will then execute for any Cameyo session starting on this server.

Advanced

Scripts can be placed in one of two locations: %UserProfile%\Cameyo or %ProgramData%\Cameyo.

The name portion of the script file determines its execution mode:

StartupBefore/StartupAfter[Sync].[vbs/bat/exe/ps1]

  • StartupBefore: script will execute before the session's module. For example, if the session is intended to launch WordPad.exe, the script will launch before WordPad executes.
  • StartupAfter: script will execute after the session's module, but right before opening the session (before hiding the "Connecting" HTML screen and showing the app session to user). For example, if the session is intended to launch WordPad.exe, the script will launch before WordPad executes.
  • Sync: an optional suffix which blocks the workflow until the script finishes execution.

StartupSystem.[vbs/bat/exe/ps1]

  • StartupSystem: script will execute as SYSTEM user, hence with maximum local privileges. This is only recommended for cases where script requires administrator privileges.

Examples:

  • C:\ProgramData\Cameyo\StartupBefore.vbs: executes before program starts.
  • C:\ProgramData\Cameyo\StartupBeforeSync.vbs: executes before program starts, holds session start until script ends.
  • C:\ProgramData\Cameyo\StartupAfter.vbs: executes after program has started, right before it is shown to user.
  • C:\Users\RemoteUser1\Cameyo\StartupAfterSync.vbs: executes after program has started, right before it is shown to user. Holds session start until script ends.