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.
- Create file C:\ProgramData\Cameyo\StartupBefore.bat, with one line: "calc.exe".
- Result: this script will be executed every time a session starts.
- 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.
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: 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. Example: StartupBeforeSync.bat -> session will wait for script to finish before starting the session's application.
- StartupSystem: script will execute as SYSTEM user, hence with maximum local privileges. This is only recommended for cases where script requires administrator privileges.
- 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.