Service Manager Scripting Variables
The following variables are available in the Before Started
, After Started
, Before Stopped
and After Stopped
events.
ThisService_CustomVariableName
ThisService_Affinity
ThisService_CommandLineArguments
ThisService_CustomPort1
ThisService_CustomPort2
ThisService_CustomPort3
ThisService_CustomPort4
ThisService_CustomPort5
ThisService_Description
ThisService_Executable
ThisService_FriendlyName
ThisService_GamePort
ThisService_ServiceId
ThisService_InteractWithDesktop
ThisService_IpAddress
ThisService_ManagedInput
ThisService_ManagedOutput
ThisService_Owner
ThisService_Priority
ThisService_QueryPort
ThisService_RConPort
ThisService_RootDirectory
ThisService_Slots
ThisService_StartOnCPU0
ThisService_Startup
ThisService_StopCommands
ThisService_StopCommandWait
ThisService_StopDelay
ThisService_WorkingDirectory
ThisService_RunAsUserName
ThisServiceController - In IronPython and C# scripts, this can be used to read and update values in the game server's `TCAdmin2\Monitor\Services\ServiceId\Service.cfg`.
The following variables are available in the After Started
, Before Stopped
and After Stopped
events.
ThisService_Pid
- Id of the process that was started/stopped.
example
commandline = ThisServiceController.ServiceConfig["Service.CommandLineArguments"]