The QGIS Windows installer is not putting double quotes around path names that have embedded spaces. I've submitted a bug report. See line 88 of my install log below (or search for: C:\PROGRA~1\QGIS' is not recognized
). Looks like lots of people have been stumped by this for quite some time. Hope this fixes it.
C:\Program Files\QGIS Valmiera\postinstall.log
OSGEO4W_ROOT=C:\PROGRA~1\QGIS Valmiera
OSGEO4W_STARTMENU=C:\ProgramData\Microsoft\Windows\Start Menu\Programs\QGIS Valmiera
OSGEO4W_ROOT_MSYS=/C/PROGRA~1/QGIS Valmiera
C:\PROGRA~1\QGIS Valmiera>"C:\PROGRA~1\QGIS Valmiera"\bin\make-bat-for-py.bat
Generating .bat files for all .py files in C:\PROGRA~1\QGIS Valmiera\bin
C:\PROGRA~1\QGIS Valmiera>set ICON=C:\PROGRA~1\QGIS Valmiera\apps\grass\grass-6.4.3\etc\gui\icons\grass_osgeo.ico
C:\PROGRA~1\QGIS Valmiera>set ICON_CMD=C:\PROGRA~1\QGIS Valmiera\apps\grass\grass-6.4.3\etc\gui\icons\grass_cmd.ico
C:\PROGRA~1\QGIS Valmiera>set BATCH=C:\PROGRA~1\QGIS Valmiera\bin\grass64.bat
C:\PROGRA~1\QGIS Valmiera>textreplace -std -t "C:\PROGRA~1\QGIS Valmiera"\bin\grass64.bat
C:\PROGRA~1\QGIS Valmiera>textreplace -std -t "C:\PROGRA~1\QGIS Valmiera"\bin\grass64
C:\PROGRA~1\QGIS Valmiera>textreplace -std -t "C:\PROGRA~1\QGIS Valmiera"\apps\grass\grass-6.4.3\etc\fontcap
C:\PROGRA~1\QGIS Valmiera>del "C:\PROGRA~1\QGIS Valmiera"\bin\grass64.bat.tmpl
C:\PROGRA~1\QGIS Valmiera>del "C:\PROGRA~1\QGIS Valmiera"\bin\grass64.tmpl
C:\PROGRA~1\QGIS Valmiera>if not 1 == 0 mkdir "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\QGIS Valmiera"
A subdirectory or file C:\ProgramData\Microsoft\Windows\Start Menu\Programs\QGIS Valmiera already exists.
C:\PROGRA~1\QGIS Valmiera>if not 1 == 0 nircmd shortcut "C:\PROGRA~1\QGIS Valmiera\bin\nircmd.exe" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\QGIS Valmiera\GRASS GIS 6.4.3" "GRASS GIS 6.4.3 GUI" "exec hide """C:\PROGRA~1\QGIS Valmiera\bin\grass64.bat" -wx" "C:\PROGRA~1\QGIS Valmiera\apps\grass\grass-6.4.3\etc\gui\icons\grass_osgeo.ico"
C:\PROGRA~1\QGIS Valmiera>if not 1 == 0 nircmd shortcut "C:\PROGRA~1\QGIS Valmiera\bin\grass64.bat" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\QGIS Valmiera\GRASS GIS 6.4.3" "GRASS GIS 6.4.3 Command Line" "-text" "C:\PROGRA~1\QGIS Valmiera\apps\grass\grass-6.4.3\etc\gui\icons\grass_osgeo.ico"
C:\PROGRA~1\QGIS Valmiera>if not 1 == 0 nircmd shortcut "C:\PROGRA~1\QGIS Valmiera\bin\nircmd.exe" "~$folder.desktop$" "GRASS GIS 6.4.3" "exec hide """C:\PROGRA~1\QGIS Valmiera\bin\grass64.bat" -wx" "C:\PROGRA~1\QGIS Valmiera\apps\grass\grass-6.4.3\etc\gui\icons\grass_osgeo.ico"
C:\PROGRA~1\QGIS Valmiera>mkdir "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\QGIS Valmiera"
A subdirectory or file C:\ProgramData\Microsoft\Windows\Start Menu\Programs\QGIS Valmiera already exists.
C:\PROGRA~1\QGIS Valmiera>xxmklink "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\QGIS Valmiera\MSYS.lnk" "C:\PROGRA~1\QGIS Valmiera\apps\msys\msys.bat" " " \ "Minimal SYStem" 7 "C:\PROGRA~1\QGIS Valmiera\apps\msys\msys.ico"
XXMkLink ver 1.00 (c)2005 Copyright Pixelab, Inc.
The shortut created as follows
Shortcut path: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\QGIS Valmiera\MSYS.lnk
Target object: C:\PROGRA~1\QGIS Valmiera\apps\msys\msys.bat
Arguments;
Working Directory: \
Description: Minimal SYStem
Display Mode: Minimized (7)
Icon file: C:\PROGRA~1\QGIS Valmiera\apps\msys\msys.ico
C:\PROGRA~1\QGIS Valmiera>xxmklink "C:\ProgramData\Desktop\MSYS.lnk" "C:\PROGRA~1\QGIS Valmiera\apps\msys\msys.bat" " " \ "Minimal SYStem" 7 "C:\PROGRA~1\QGIS Valmiera\apps\msys\msys.ico"
XXMkLink ver 1.00 (c)2005 Copyright Pixelab, Inc.
The shortut created as follows
Shortcut path: C:\ProgramData\Desktop\MSYS.lnk
Target object: C:\PROGRA~1\QGIS Valmiera\apps\msys\msys.bat
Arguments;
Working Directory: \
Description: Minimal SYStem
Display Mode: Minimized (7)
Icon file: C:\PROGRA~1\QGIS Valmiera\apps\msys\msys.ico
C:\PROGRA~1\QGIS Valmiera>textreplace -std -t apps/msys/etc/fstab
C:\PROGRA~1\QGIS Valmiera>dllupdate -oite -copy -reboot "C:\PROGRA~1\QGIS Valmiera\bin\libeay32.dll"
C:\PROGRA~1\QGIS Valmiera\bin\libeay32.dll: Version=1.0.1.5
C:\Windows\system32\libeay32.dll: Version=0.0.0.0
Target does not exist, no action.
C:\PROGRA~1\QGIS Valmiera>dllupdate -oite -copy -reboot "C:\PROGRA~1\QGIS Valmiera\bin\ssleay32.dll"
C:\PROGRA~1\QGIS Valmiera\bin\ssleay32.dll: Version=1.0.1.5
C:\Windows\system32\ssleay32.dll: Version=0.0.0.0
Target does not exist, no action.
C:\PROGRA~1\QGIS Valmiera>textreplace -std -t bin\pyuic4.bat
C:\PROGRA~1\QGIS Valmiera>set OSGEO4W_ROOT=C:\\PROGRA~1\\QGIS Valmiera
C:\PROGRA~1\QGIS Valmiera>textreplace -std -t apps\Python27\Lib\site-packages\PyQt4\pyqtconfig.py
C:\PROGRA~1\QGIS Valmiera>call C:\PROGRA~1\QGIS Valmiera\bin\make-bat-for-py.bat
'C:\PROGRA~1\QGIS' is not recognized as an internal or external command,
operable program or batch file.
C:\PROGRA~1\QGIS Valmiera>call "C:\PROGRA~1\QGIS Valmiera"\bin\o4w_env.bat
'"C:\PROGRA~1\QGIS"' is not recognized as an internal or external command,
operable program or batch file.
OSGEO4W home is C:\PROGRA~1\QGIS Valmiera
Synchronizing CRS database with GDAL/PROJ definitions.
0: src=SOURCE_CRS_CODE dst=source_crs_code idx=2
1: src=TARGET_CRS_CODE dst=target_crs_code idx=3
2: src=REMARKS dst=remarks idx=4
3: src=COORD_OP_SCOPE dst=scope idx=5
4: src=AREA_OF_USE_CODE dst=area_of_use_code idx=6
5: src=DEPRECATED dst=deprecated idx=12
6: src=COORD_OP_METHOD_CODE dst=coord_op_method_code idx=13
7: src=DX dst=p1 idx=14
8: src=DY dst=p2 idx=15
9: src=DZ dst=p3 idx=16
10: src=RX dst=p4 idx=17
11: src=RY dst=p5 idx=18
12: src=RZ dst=p6 idx=19
13: src=DS dst=p7 idx=20
14: src=PREFERRED dst=preferred idx=21
15: src=COORD_OP_CODE dst=coord_op_code idx=1
Only 0 columns
Load srs db from: C:/PROGRA~1/QGIS Valmiera/apps/qgis/./resources/srs.db
Loaded 465/466 from C:\Program Files (x86)\PostgreSQL\9.3\gdal-data\gcs.csv
Loaded 3790/3831 from C:\Program Files (x86)\PostgreSQL\9.3\gdal-data\pcs.csv
Loaded 147/148 from C:\Program Files (x86)\PostgreSQL\9.3\gdal-data\vertcs.csv
Loaded 61/62 from C:\Program Files (x86)\PostgreSQL\9.3\gdal-data\compdcs.csv
Loaded 129/130 from C:\Program Files (x86)\PostgreSQL\9.3\gdal-data\geoccs.csv
Loading epsg.wkt
Loading esri_extra.wkt
5044 WKTs loaded
CRS update (inserted:128 updated:147 deleted:1 errors:0)
275 CRSs updated.
C:\PROGRA~1\QGIS Valmiera>textreplace -std -t bin\qgis.bat
C:\PROGRA~1\QGIS Valmiera>textreplace -std -t bin\qgis-browser.bat
C:\PROGRA~1\QGIS Valmiera>REM get short path without blanks
C:\PROGRA~1\QGIS Valmiera>for %i in ("C:\PROGRA~1\QGIS Valmiera") do set O4W_ROOT=%~fsi
C:\PROGRA~1\QGIS Valmiera>set O4W_ROOT=C:\PROGRA~1\QGIS Valmiera
C:\PROGRA~1\QGIS Valmiera>if not 1 == 0 mkdir "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\QGIS Valmiera"
A subdirectory or file C:\ProgramData\Microsoft\Windows\Start Menu\Programs\QGIS Valmiera already exists.
C:\PROGRA~1\QGIS Valmiera>if not 1 == 0 nircmd shortcut "C:\PROGRA~1\QGIS Valmiera\bin\nircmd.exe" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\QGIS Valmiera" "QGIS Desktop 2.2.0" "exec hide C:\PROGRA~1\QGIS Valmiera\bin\qgis.bat" "C:\PROGRA~1\QGIS Valmiera\apps\qgis\icons\QGIS.ico"
C:\PROGRA~1\QGIS Valmiera>if not 1 == 0 nircmd shortcut "C:\PROGRA~1\QGIS Valmiera\bin\nircmd.exe" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\QGIS Valmiera" "QGIS Browser 2.2.0" "exec hide C:\PROGRA~1\QGIS Valmiera\bin\qgis-browser.bat" "C:\PROGRA~1\QGIS Valmiera\apps\qgis\icons\QGIS.ico"
C:\PROGRA~1\QGIS Valmiera>if not 1 == 0 nircmd shortcut "C:\PROGRA~1\QGIS Valmiera\bin\nircmd.exe" "~$folder.desktop$" "QGIS Desktop 2.2.0" "exec hide C:\PROGRA~1\QGIS Valmiera\bin\qgis.bat" "C:\PROGRA~1\QGIS Valmiera\apps\qgis\icons\QGIS.ico"
C:\PROGRA~1\QGIS Valmiera>if not 1 == 0 nircmd shortcut "C:\PROGRA~1\QGIS Valmiera\bin\nircmd.exe" "~$folder.desktop$" "QGIS Browser 2.2.0" "exec hide C:\PROGRA~1\QGIS Valmiera\bin\qgis-browser.bat" "C:\PROGRA~1\QGIS Valmiera\apps\qgis\icons\QGIS.ico"
C:\PROGRA~1\QGIS Valmiera>set OSGEO4W_ROOT=C:\\PROGRA~1\\QGIS Valmiera
C:\PROGRA~1\QGIS Valmiera>textreplace -std -t "C:\PROGRA~1\QGIS Valmiera\apps\qgis\bin\qgis.reg"
C:\PROGRA~1\QGIS Valmiera>nircmd elevate "C:\Windows\regedit" /s "C:\PROGRA~1\QGIS Valmiera\apps\qgis\bin\qgis.reg"
C:\PROGRA~1\QGIS Valmiera>set OSGEO4W_ROOT=C:\\PROGRA~1\\QGIS Valmiera
C:\PROGRA~1\QGIS Valmiera>textreplace -std -t "C:\\PROGRA~1\\QGIS Valmiera"\apps\Qt4\mkspecs\default\qmake.conf
C:\PROGRA~1\QGIS Valmiera>set OSGEO4W_ROOT=C:/PROGRA~1/QGIS Valmiera
C:\PROGRA~1\QGIS Valmiera>textreplace -std -t "C:/PROGRA~1/QGIS Valmiera"\bin\qt.conf
C:\PROGRA~1\QGIS Valmiera>if not 1 == 0 mkdir "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\QGIS Valmiera"
A subdirectory or file C:\ProgramData\Microsoft\Windows\Start Menu\Programs\QGIS Valmiera already exists.
C:\PROGRA~1\QGIS Valmiera>if not 1 == 0 nircmd shortcut "C:\PROGRA~1\QGIS Valmiera\bin\nircmd.exe" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\QGIS Valmiera" "SAGA GIS (2.0.8)" "exec hide """C:\PROGRA~1\QGIS Valmiera\bin\saga_gui.bat"" -wx" "C:\PROGRA~1\QGIS Valmiera\apps\saga\saga_gui.exe"
C:\PROGRA~1\QGIS Valmiera>if not 1 == 0 nircmd shortcut "C:\PROGRA~1\QGIS Valmiera\bin\nircmd.exe" "C:\ProgramData\Desktop" "SAGA GIS (2.0.8)" "exec hide """C:\PROGRA~1\QGIS Valmiera\bin\saga_gui.bat"" "C:\PROGRA~1\QGIS Valmiera\apps\saga\saga_gui.exe"
C:\PROGRA~1\QGIS Valmiera>nircmd shortcut "C:\PROGRA~1\QGIS Valmiera\bin\nircmd.exe" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\QGIS Valmiera" "Setup" "exec hide ~qC:\PROGRA~1\QGIS Valmiera\bin\setup.bat~q -R ~qC:\PROGRA~1\QGIS Valmiera~q" "C:\PROGRA~1\QGIS Valmiera\OSGeo4W.ico"
C:\PROGRA~1\QGIS Valmiera>textreplace -std -t bin/setup.bat
C:\PROGRA~1\QGIS Valmiera>textreplace -std -t bin/setup-test.bat
C:\PROGRA~1\QGIS Valmiera>if not 1 == 0 mkdir "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\QGIS Valmiera"
A subdirectory or file C:\ProgramData\Microsoft\Windows\Start Menu\Programs\QGIS Valmiera already exists.
C:\PROGRA~1\QGIS Valmiera>if not 1 == 0 xxmklink "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\QGIS Valmiera\OSGeo4W Shell.lnk" "C:\PROGRA~1\QGIS Valmiera\OSGeo4W.bat" " " \ "OSGeo for Windows command shell" 1 "C:\PROGRA~1\QGIS Valmiera\OSGeo4W.ico"
XXMkLink ver 1.00 (c)2005 Copyright Pixelab, Inc.
The shortut created as follows
Shortcut path: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\QGIS Valmiera\OSGeo4W Shell.lnk
Target object: C:\PROGRA~1\QGIS Valmiera\OSGeo4W.bat
Arguments;
Working Directory: \
Description: OSGeo for Windows command shell
Display Mode: Normal Window (1)
Icon file: C:\PROGRA~1\QGIS Valmiera\OSGeo4W.ico
C:\PROGRA~1\QGIS Valmiera>if not 1 == 0 xxmklink "C:\ProgramData\Desktop\OSGeo4W Shell.lnk" "C:\PROGRA~1\QGIS Valmiera\OSGeo4W.bat" " " \ "OSGeo for Windows command shell" 1 "C:\PROGRA~1\QGIS Valmiera\OSGeo4W.ico"
XXMkLink ver 1.00 (c)2005 Copyright Pixelab, Inc.
The shortut created as follows
Shortcut path: C:\ProgramData\Desktop\OSGeo4W Shell.lnk
Target object: C:\PROGRA~1\QGIS Valmiera\OSGeo4W.bat
Arguments;
Working Directory: \
Description: OSGeo for Windows command shell
Display Mode: Normal Window (1)
Icon file: C:\PROGRA~1\QGIS Valmiera\OSGeo4W.ico
C:\PROGRA~1\QGIS Valmiera>set OSGEO4W_ROOT=C:\\PROGRA~1\\QGIS Valmiera
C:\PROGRA~1\QGIS Valmiera>textreplace -std -t apps\Python27\Lib\site-packages\sipconfig.py