Small company logo:
   History
 
Advertising banner:
 
 BatchAdmin
 
Purpose
Runs administration-level FirstClass scripting commands. This command behaves like the RAD.DLL version of the same command, with some additional control.
The return string will contain either the requested data or information describing any errors that might have occurred.
A return code is generated and may be returned with FCBatchAdminCode. A return string of text is generated and may be returned with FCBatchAdminReply.
Syntax
BatchAdmin (Command [, BufferSize, TRUE | FALSE, TRUE | FALSE, TRUE | FALSE])


Command
The command you want passed to FirstClass scripting. This command is passed with administrator-level permissions.
BufferSize
The number of bytes of buffer to reserve for the answer (example: 4096 would be 4k).
The limit to this buffer is the available memory on the server machine.
If you use BufferSize, you must also use the three TRUE | FALSE arguments.
TRUE | FALSE
The first TRUE | FALSE controls whether to translate the input string.
TRUE | FALSE
The second TRUE | FALSE controls whether to translate the output string.
TRUE | FALSE
The third TRUE | FALSE controls whether to translate escape characters.

Example
BatchAdmin ("get user admin 1205",4096,TRUE,TRUE,TRUE)
if FCBatchAdminCode <> 0 Then
        Print "Error with batch script!!!"
        Print "The error message is:"; FCBatchAdminReply
Else
        Print "The Admin's account is:"; FCBatchAdminReply 'gets the admin user ID and prints it to the debug window
End If