1.注册服务sc create Nginx binpath= D:Nginx ginx ginx.exe type= own start= auto displayname= nginxApi
2.启动服务net start nginxApi
3.停止服务net stop nginxApi
4.删除服务sc delete "nginxApi"