I am trying to build QGIS on a 64 bit machine with Windows 7 SP1.

My bat file is as follows:

@echo off

set VS90COMNTOOLS=%Program Files (x86)%\Microsoft Visual Studio 10.0\Common7\Tools\
call "%Program Files (x86)%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" 
set INCLUDE=%INCLUDE%;%Program Files%\Microsoft SDKs\Windows\v7.0\include
set LIB=%LIB%;%Program Files%\Microsoft SDKs\Windows\v7.0\lib
call "%OSGEO4W_ROOT%\bin\o4w_env.bat"
path %PATH%;%Program Files (x86)%\CMake 2.8\bin;C:\cygwin64\bin
@set GRASS_PREFIX=C:/OSGeo4W64/apps/grass/grass-6.4.3
@set LIB=%LIB%;%OSGEO4W_ROOT%\lib;%OSGEO4W_ROOT%\lib


This shows me the error

The system cannot find the path specified.

I have checked all the paths but I'm not able to solve the problem.

  • I think this %Program Files (x86)% should be just Program Files (x86) in line 9
    – chrki
    Aug 15, 2016 at 18:41
  • 3
    %Program Files (x86)% should be %PROGRAMFILES%, %PROGRAMFILES% is normally "C:\Program Files (x86)"
    – klewis
    Aug 15, 2016 at 20:57

2 Answers 2


Answer based on @klewis comment :

In your code, try changing %Program Files (x86)% into `%PROGRAMFILES%

Check the environment variable PROGRAMFILES in the "System variables" list. It should point to a value like : "C:\Program Files (x86)".

Windows environment variables



You can use alternative build system based on NextGIS borsch. No additional bat files needed. The requirements are:

  • VC
  • Python
  • git
  • CMake

Warning! This is lite version of QGIS (remove many features for stable and speed).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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