.bat für Apache, SQL und Explorer

Busti

Mitglied
Hallo,

ich habe hier eine jsp-Seite gebastelt, diese läuft nun über den Apache.
Ich hätte jetzt gerne eine Batchdatei, welche folgendes erledigt.

1. System durchsuche, ob Mozilla Firefox vorhanden ist
2. a) vorhanden: Apache starten, mysql starten, Firefox starten mit der Adresse http://localhost:8080/jsp-examples/jsp/frameset.html
b) nicht vorhanden: Apache starten, mysql starten, IE starten mit der Adresse http://localhost:8080/jsp-examples/jsp/frameset.html
3. sobald der Explorer beendet wird mysql und dann Apache beenden

Ich komm damit irgendwie nicht zurecht, hier mal mein "Kraut":

Code:
@ECHO OFF
set JAVA_HOME=java\j2sdk1.4.2_03
set CATALINA_HOME=tomcat
set EB_STATIC_MODE=0
set SQL_DATA_DIR="%CD%/mysql4/data"

call tomcat_start.bat
cd ..\..

IF EXIST %SYSTEMDRIVE%"\Programme\Mozilla Firefox\firefox.exe" GOTO test

ECHO ie
call mysql_start.bat
start /D %SYSTEMDRIVE%"\Internet Explorer\" iexplore.exe "http://localhost:8080/jsp-examples/jsp/frameset.html"
GOTO end

:test
ECHO test
call mysql_start.bat
start /D %SYSTEMDRIVE%"\Mozilla Firefox\" firefox.exe "http://localhost:8080/jsp-examples/jsp/frameset.html"

rem :end
mysql_stop.bat
tomcat_stop.bat
PAUSE

Wenn ich nun den Befehl "call mysql_start.bat" vor dem Aufruf des Explorers mache, startet der Explorer gar nicht, erst wenn ich mysql wieder beende.
Außerdem stimmt die If-Anweisung nicht.

Die mysql_start.bat sieht so aus:

Code:
@echo off
echo Diese Eingabeforderung nicht waehrend des Running beenden
echo Please dont close Window while MySQL is running
echo MySQL is trying to start
echo Please wait  ...
echo MySQL is starting with mysql\bin\my.cnf (console)

"%CD%\mysql4\bin\mysqld" --defaults-file="%CD%\mysql4\bin\my.cnf" --standalone --console
rem start "%CD%\mysql4\bin\mysqld.exe"

if errorlevel 1 goto error
goto finish

:error
echo.
echo MySQL konnte nicht gestartet werden
echo MySQL could not be started
pause

:finish
 
Zurück