The script will be run with the workspace as the current directory. The text you enter in the text box will be executed as a batch file, and a result will be considered a false value if at the end of the execution %ERRORLEVEL% is not 0.

If you already have a batch file in SCM, you can just type in the path of that batch file (again relative to the workspace directory), and simply execute that.