Transferred from: http://www.cnblogs.com/derekchen/archive/2011/02/17/1957209.html
Cls@echo OFFSET nginx_path=d:\program files\set nginx_dir=nginx-1.11.11\title NGINX Management program Goto Menu:menuclsecho. ECHO. * * * * NGINX Management Program * * * ECHO. * *echo. * 1 start Nginx *echo. * *echo. * 2 off Nginx *echo. * *echo. * 3 Restart Nginx *echo. * *echo. * 4 Exit *echo. * *echo. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *echo. ECHO. Please enter the sequence number of the selected item: set/p id=if "%id%" = = "1" GOTO cmd1if "%id%" = = "2" GOTO cmd2if "%id%" = = "3" GOTO cmd3if "%id%" = "4" Exitpause : Cmd1echo.echo. Start nginx......cd%nginx_path%cd%nginx_dir%if not EXIST nginx.exe ECHO Nginx.exe does not exist IF EXIST Nginx.exe star T Nginx.exeECHO.OKPAUSEGOTO MENU:cmd2ECHO.ECHO. Close nginx......taskkill/f/im nginx.exe > Nulecho.okpausegoto MENU: Cmd3echo.echo. Close nginx......taskkill/f/im nginx.exe > Nulecho.okgoto cmd1goto MENU
Go Windows cmd nginx startup, restart, shutdown function