service_windows.bat 764 B

12345678910111213141516
  1. @echo off
  2. if not "%1" == "install" ( if not "%1" == "uninstall" ( if not "%1" == "start" ( if not "%1" == "stop" (
  3. echo service_windows.bat install ^| uninstall ^| start ^| stop
  4. echo depends on Microsoft.NET Framework 4
  5. goto out
  6. ))))
  7. echo ^<configuration^> > %~dp0local\service.xml
  8. echo ^<id^>O2SERVER^<^/id^> >> %~dp0local\service.xml
  9. echo ^<name^>O2SERVER SERVICE^<^/name^> >> %~dp0local\service.xml
  10. echo ^<description^>O2OA Platform Service.^<^/description^> >> %~dp0local\service.xml
  11. echo ^<executable^>%~dp0start_windows.bat^</executable^> >> %~dp0local\service.xml
  12. echo ^<log mode="none"^/^> >> %~dp0local\service.xml
  13. echo ^</configuration^> >> %~dp0local\service.xml
  14. copy %~dp0commons\winsw.exe %~dp0local\service.exe
  15. %~dp0local\service.exe %1
  16. :out