Can't run the Nginx executable file Can't run the Nginx executable file nginx nginx

Can't run the Nginx executable file


  1. First you need to know the path to your nginx.exe file.

  2. Once you have that right click on your desktop and click on the new text document.

  3. Then type or paste in the following text:

c:\cd c:\nginxstart nginx.execmd /k
  1. Now save the file with whatever name you want to use but add the .bat extension to it. Example nginx.bat

  2. Now you can click on the file and it should open the command prompt, change the directory, start the server, and then leave the prompt open in the correct directory so you can run your commands.


I made a different version of the script of Larry Lane.With this version you can invoke nginx from any path.

The script needs to be in any route accessible via Windows path and should be named nginx.bat.

@echo offSET var=%cd%cd C:/nginxnginx %*cd %var%

Execution example:

Execution example