diff --git a/dmsctl.bat b/dmsctl.bat index 139a750..8159e73 100644 --- a/dmsctl.bat +++ b/dmsctl.bat @@ -4,10 +4,12 @@ rem KnowledgeTree Control Script rem ============= SET ENVIRONMENT VARIABLES ============== -set ZEND_PATH=C:\PROGRA~1\Zend\ -set INSTALL_PATH=%ZEND_PATH%\KnowledgeTree -set JAVA_BIN=%INSTALL_PATH%\jre\bin\java.exe -set SOFFICE_PATH=%INSTALL_PATH%\openoffice +set INSTALL_PATH=%CD% +cd .. +set ZEND_PATH=%CD% +cd %INSTALL_PATH% +set JAVA_BIN=%ZEND_PATH%\jre\bin\java.exe +set SOFFICE_PATH=%ZEND_PATH%\openoffice set SOFFICE_BIN=%SOFFICE_PATH%\program\soffice.exe set SOFFICE_PORT=8100 @@ -15,9 +17,8 @@ set OpenofficeServiceName=KTOpenoffice set SchedulerServiceName=KTScheduler set LuceneServiceName=KTLucene - rem ============= MAIN ============== -if NOT ""%1"" == ""help"" IF NOT ""%1"" == ""start"" IF NOT ""%1"" == ""stop"" IF NOT ""%1"" == ""restart"" IF NOT ""%1"" == ""install"" IF NOT ""%1"" == ""uninstall"" goto help +if NOT ""%1"" == ""help"" IF NOT ""%1"" == ""start"" IF NOT ""%1"" == ""path"" IF NOT ""%1"" == ""stop"" IF NOT ""%1"" == ""restart"" IF NOT ""%1"" == ""install"" IF NOT ""%1"" == ""uninstall"" goto help goto %1 :help @@ -64,11 +65,21 @@ sc delete %SchedulerServiceName% sc delete %OpenofficeServiceName% goto end +:path +echo ZEND_PATH == %ZEND_PATH% +echo INSTALL_PATH == %INSTALL_PATH% +echo JAVA_BIN == %JAVA_BIN% +echo SOFFICE_PATH == %SOFFICE_PATH% +echo SOFFICE_BIN == %SOFFICE_BIN% +goto end + :install echo Installing services -call "%INSTALL_PATH%\var\bin\officeinstall.bat" -call "%INSTALL_PATH%\var\bin\schedulerinstall.bat" -call "%INSTALL_PATH%\var\bin\luceneinstall.bat" +IF EXIST "%INSTALL_PATH%\var\bin\officeinstall.bat" call "%INSTALL_PATH%\var\bin\officeinstall.bat" +echo The Open Office automatic service was successfully installed +IF EXIST "%INSTALL_PATH%\var\bin\schedulerinstall.bat" call "%INSTALL_PATH%\var\bin\schedulerinstall.bat" +echo The Scheduler automatic service was successfully installed +IF EXIST "%INSTALL_PATH%\var\bin\luceneinstall.bat" call "%INSTALL_PATH%\var\bin\luceneinstall.bat" goto end :end \ No newline at end of file