TScript Command Line Switches
When executing TScript from the command line, there are a number of switches available to give the source script various levels of permissions.
The –l <path> switch (CTScript::LIBRARY_DIRECTORY) allows the TScript engine to include file on this path. Only files with the "#include" compiler command can read files from this path.
The –puse switch (CTScript::PROMPT_USER_SECURITY_EXCEPTIONS) prompt user for security exceptions, will allow message boxes and give the user the ability to add extra permissions.
The –wpr <path> switch (CTScript::WORK_PATH_READ) allows the Tscript source to read files opened with System::CreateFlie or the System::LoadLibrary on this path. This switch can be either a directory or to a specific file depending on the amount of permission you wish to give the executing script.
The –wpw <path> switch (CTScript::WORK_PATH_WRITE) operates in the same way as the –wpr switch, excepts it add the additional permission to write to the opened file.
The –tpw <path> switch (CTScript::TEMP_PATH_WRITE) operates in the same way as the –wpw switch, excepts restricts to the system temporary directory.
The –dll switch (CTScript::ALLOW_LOAD_DLL) allows the source script to open a dynamic linking library with the System::LoadLibrary method. This must be used in conjunction with either the –wpw or -wpr switches to give the script permission to read the file. This switch must only be used in special circumstances as there is no security control over the native executing library code and it will be able to access any system resource that the executing user may access.
The –socket switch (CTScript::ALLOW_SOCKET_CONNECT) allows the source script to open a TCP internet connection with the System::SocketConnect method.
The –D <variable> switch (CTScript::PREPROCESSOR_DEFINITION) defines any preprocessor variables required to process any include C++ header files. This switch only currently works for C++ files.
The –tz <timezone> switch (CTScript::LOCAL_TIMEZONE) sets the time for any filetime to string functions that are called.