call gen-conf.bat
set currpath=%cd%
cd /d %currpath%
echo ^<service^> > nginx-service.xml
echo ^<id^>nginx^</id^> >> nginx-service.xml
echo ^<name^>Nginx Service^</name^> >> nginx-service.xml
echo ^<description^>High Performance Nginx Service^</description^> >> nginx-service.xml
echo ^<logpath^>%currpath%\logs^</logpath^> >> nginx-service.xml
echo ^<log mode="roll-by-size"^> >> nginx-service.xml
echo ^<sizeThreshold^>10240^</sizeThreshold^> >> nginx-service.xml
echo ^<keepFiles^>8^</keepFiles^> >> nginx-service.xml
echo ^</log^> >> nginx-service.xml
echo ^<executable^>%currpath%\nginx.exe^</executable^> >> nginx-service.xml
echo ^<startarguments^>-p %currpath%^</startarguments^> >> nginx-service.xml
echo ^<stopexecutable^>%currpath%\nginx.exe^</stopexecutable^> >> nginx-service.xml
echo ^<stoparguments^>-p %currpath%\nginx.exe -s stop^</stoparguments^> >> nginx-service.xml
echo ^</service^> >> nginx-service.xml
call nginx-service.exe install
net start nginx