init.bat 793 B

123456789101112131415161718192021222324252627282930313233
  1. @ECHO OFF
  2. SET PATH=%systemRoot%;%systemRoot%\system32;%PATH%
  3. SET lastDir=%cd%
  4. SET baseDir=%~dp0
  5. SET cronDir=%baseDir%cron\
  6. set sysCron=%cronDir%sys.cron
  7. :: get phpcli and pmsRoot
  8. SET phpcli=%1
  9. SET pmsRoot=%2
  10. :input_php
  11. IF "%phpcli%"=="" SET /P phpcli="Please input your php path:(example: c:\windows\php.exe)"
  12. if "%phpcli%"=="" (
  13. echo php path is error
  14. goto input_php
  15. )
  16. if not exist %phpcli% (
  17. echo php path is error
  18. goto input_php
  19. )
  20. :input_url
  21. IF "%pmsRoot%"=="" SET /P pmsRoot="Please input zentao url:(example: http://localhost or http://127.0.0.1:88)"
  22. IF "%pmsRoot%"=="" (
  23. echo zentao url is error
  24. goto input_url
  25. )
  26. :: get pmsRoot
  27. if "%pmsRoot:~-1%" == "/" SET pmsRoot=%pmsRoot:~0,-1%
  28. %phpcli% %baseDir%php\init.php %phpcli% %pmsRoot%
  29. :: return 0 when success.
  30. exit /b 0