same for bat file.
and that script contains the command launching of selenium server or directly execute the command for launching server. Please be clear about your question and in which language??????

Let me clear about your problem, you want to start the selenium server automatically through some code. You can run a process by php-unit as we are doing that thing with java-junit same tool as php-unit used for testing. In Junit we are using the annotations that specifies the which code should be executed by Junit. Similarly you can add annotations in your code for specifying that phpunit will run it.
–
Dinesh DhimanOct 17 '11 at 10:45