enable, restart, and disable nginx in Windows
CLS @ echo off set nginx_path = E: Set nginx_dir = E: \ nginx-0.8.40 \ color 0a title nginx management Program power by ants (http://leleroyn.cnblogs.com) goto menu: menu CLS echo. echo. * *** nginx hypervisor power by ants (http://leleroyn.cnblogs.com) *** echo. ** echo. * 1 start nginx * echo. ** echo. * 2 disable nginx * echo. ** echo. * 3 restart nginx * echo. ** echo. * 4 return * echo. ** echo. * ************************ echo. echo. enter the serial number of the selected project: set/P id = if "% ID %" = "1" Goto cmd1 if "% ID %" = "2" Goto cmd2 if "% ID %" =" 3 "Goto cmd3 if" % ID % "=" 4 "Exit pause: cmd1 echo. echo. start nginx ...... if not exist nginx_dir1_nginx.exe echo when nginx_dir1_nginx.exe does not exist % nginx_path % Cd % nginx_dir % if exist does nginx_dir1_nginx.exe start when nginx_dir1_nginx.exe echo. OK pause goto menu: cmd2 echo. echo. disable nginx ...... taskkill/f/IM nginx.exe> NUL echo. OK pause goto menu: cmd3 echo. echo. disable nginx ...... taskkill/f/IM nginx.exe> NUL echo. OK goto cmd1 goto menu