I have QGIS running on a windows operating system. I am willing to use QGIS from command line to follow this procedure.

Unfortunately, i cannot manage to have qgis declared in the command windows. I have added "C:\Program Files (x86)\Quantum GIS Lisboa\" to the path variable. but it does not seem to be sufficient.

Would you have any tip on that ?


As proposed by Andre Joost, declaring the \bin subdirectory is a first step. Following procedure, the command I am trying to run is:

 C:\...>qgis --project myproject.qgs --snapshot image.png 
 --width 1500 --height 1000 --extent 831421.30, 6496828.19, 860046.84, 6536520.86

QGIS loads the project and then the cursor freeze/standby. and Qgis answers no more for several minutes and I kill it. the snapshot image.png and companion world file are generated but are empty (7Ko png).

the cmd output is:

_path=C:\PROGRA~2\Quantum GIS Lisboa\apps\Python27\Scripts
OSGEO4W home is C:\PROGRA~2\Quantum GIS Lisboa


best regard, Pascal

  • Add some more information, please. What is the actual command you were trying to execute, and what output did you get? Mar 18, 2013 at 15:53

1 Answer 1


You have to start qgis.bat, not qgis.exe. The bat is in the \bin subdirectory.

Otherwise the environment variables are not set properly.

If you want to start Qgis from a selfmade batch, you have to use a CALL statement to invoke qgis.bat.


I'm afraid you are out of luck with --snapshot:



It worked with earlier versions of QGIS (when the blog was actually written). I get the same behaviour with Lisboa and Master from last November.

  • thanks; adding the QGIS \bin subdirectory made it available for the cmd.
    – Pascal
    Mar 18, 2013 at 16:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.