Jump to content

Read variables from config file and use in custom script?


XstreamGaming

Recommended Posts

Hello,

As the title above says. Is it possible with TCAdmin?

 

I would like the user to be able to select variables from a drop down list, so I can execute them in a custom script at startup.

 

If not, is it possible to pass these values out to a cfg file on starting or restarting a server?

 

Sam

Link to comment
Share on other sites

You can do this with the commandline manager. Include the variables in your commandline and configure the variable's commandline settings. When the user selects the commandline it will ask for the variable values.

Link to comment
Share on other sites

Thanks for the reply LFA.

How would the variable be called in the script? At the moment I have a commandline variable called timezone.

 

When I try to access it in a custom script (%timezone% and %service_timezone%) I get no value passed.

 

I am able to get the default values such as %service_rootdirectory%.

 

The script is called before startup.

Link to comment
Share on other sites

Thanks for the reply LFA,

I can read parameters from TCAdmin fine using %1 , %2 but at the moment I can only access the standard variables such as %service_timezone% .

 

When I try to access the custom variable timezone (%timezone% ?) I get nothing passed to my bat.

I was thinking maybe the custom variables are named differently ( eg %custom_timezone% or %service_timezone%) ?

 

No biggie if its not possible, I have a workaround that is working well enough.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Who's Online   0 Members, 0 Anonymous, 174 Guests (See full list)

    • There are no registered users currently online
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use