Bug report #10001

Window 7 menu shortcuts broken

Added by Howard Johnson about 10 years ago. Updated over 9 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Windows Package
Affected QGIS version:2.2.0 Regression?:No
Operating System:Windows 7 x64 pro Easy fix?:No
Pull Request or Patch supplied:No Resolution:worksforme
Crashes QGIS or corrupts data:No Copied to github as #:18491

Description

Fresh install. Click on desktop QGIS Browser 2.2.0 or QGIS Desktop 2.2.0 shortcut. Nothing happens.

Notes:

a) I can start QGIS by running "C:\\Program Files (x86)\\QGIS Valmiera\\bin\
ircmd.exe\\qgis.bat" from cmd.

b) I can edit qgis.bat as suggested here: http://gis.stackexchange.com/questions/30982/why-is-qgis-not-launching/31169#31169, i.e. adding PATH systemroot\\system32; systemroot; systemroot\\system32\\wbem after @echo off, and then the shortcut mentioned above works.

c) I installed the x32 version on my x64 machine.

d) I have both Microsoft Visual C++ 2008 Redistributable Package (x86) and (x64) installed. (Someone had suggested this might be involved, so I included this info. for you.)

Perhaps the fix is to simply add this patch to the bat file, but I have no idea of what else might be involved, so I stand in awe of you guys to build this stuff.

Thanks


Related issues

Related to QGIS Application - Bug report #10004: Windows install not putting quotes around path names with... Closed 2014-04-06
Related to QGIS Application - Bug report #9409: CRS not recognized in Dufour 2.0.1 64 bit version Closed 2014-01-22
Related to QGIS Application - Bug report #9751: MSYS shortcut doesn't handle path with spaces Closed 2014-03-09
Related to QGIS Application - Bug report #10026: Postinstallation fails Closed 2014-04-08

History

#1 Updated by Howard Johnson about 10 years ago

Update: QGIS Desktop 2.2.0 is still broken with this fix above. So I tried removing the above qgis.bat patch just to double check, and now QGIS Browser 2.2.0 will start ok. Strange.

BTW, I also encountered some other errors after I got it start the first time which may be related, as follows:

Run qgis.bat from cmd starts GGIS 2.2 Valmiera and errors this:

"GRASS plugin! QGIS couldn't find your GRASS installation. Would you like to specify path (GISBASE) to your GRASS installation?"

I click ok. Then I get:

Choose GRASS installation path (GISBASE): (and a path selection dialog)

I have no idea what it is asking for, nor why I am getting an error above, so I try Cancel and get the following:

"GRASS plugin ! GRASS data won't be available if GISBASE is not specified."

(I'm sorry but I don't even know what GRASS is yet. And I don't know what GISBASE is. I'm just so new to this. It might be helpful to add a little more info on these basic error messages for new users like me who really don't know what any of this is all about. Thanks. I'm off to read whatever documentation I can find.)

I also might try another full uninstall/reinstall just to better record what I encounter.

#2 Updated by Rene Jonchere about 10 years ago

Hello

This problem is related to the deactivation of short names under windows. The short names compatibility is required for a large number of program. To reset the management of short names for access to the QGIS directory, open a box of MS/DOS dialog by running cmd.exe in administrator mode, on the root directory, execute the following two lines of commands:
C: \\> fsutil 8dot3name set 0
C: \\> fsutil file setshortname "Program Files" "PROGRA~1"
Dir / x command to check the short name for the folder "Program Files"

#3 Updated by Rene Jonchere about 10 years ago

You can execute the same commands for the folder "QGIS Valmiera" with the short name "QGISVA~1", or you can reinstall qgis because the command "fsutil 8dot3name set 0" modifies the new directories.

#4 Updated by Howard Johnson about 10 years ago

Dear Rene,

I've been writing code for over 30 years, so I well remember 8.3 file names. But they are long gone on every operating system. Long, long gone. While the patch you suggest is a valid workaround, it means most users trying to run QGIS on Windows will encounter a broken QGIS. Few, will look and find the solution. It took me a couple of days to sort out what was wrong.

Rather than stick with a dinosaur, I really think it would be better to now address this issue with double quotes around long filenames.

This month windows will retire the XP operating system after 12 long years of service, but even before XP with plain old windows 3.0 we had long filenames. So when I say dinosaur above, I mean dinosaur.

If you choose to stick with this old 8.3 stuff, then so be it, but I can't imagine that that is really what you want to do.

And yes, I know there is some older software that MUST stick with 8.3. But GGIS does not appear to be of that class of software to me. It clearly does not appear to be antique software in any other way.

So I was a bit shocked by your suggestion as to how to fix these file and path name errors.

Respectfully, -- Howard

Rene Jonchere wrote:

Hello

This problem is related to the deactivation of short names under windows. The short names compatibility is required for a large number of program. To reset the management of short names for access to the QGIS directory, open a box of MS/DOS dialog by running cmd.exe in administrator mode, on the root directory, execute the following two lines of commands:
C: \\> fsutil 8dot3name set 0
C: \\> fsutil file setshortname "Program Files" "PROGRA~1"
Dir / x command to check the short name for the folder "Program Files"

#5 Updated by Jürgen Fischer about 10 years ago

Howard Johnson wrote:

Rather than stick with a dinosaur, I really think it would be better to now address this issue with double quotes around long filenames.

This is not an actual QGIS problem. The short paths are there because GRASS and msys have problems with paths containing blanks in them (like "Program Files").

#6 Updated by Jürgen Fischer about 10 years ago

What happens if you run qgis.bat from cmd (remove the @echo off to debug)? What's the initial setting of PATH? It should already contain the paths you add. o4w_env.bat resets the path to %OSGEO4W_ROOT%\\bin;%WINDIR%\\system32;%WINDIR%;%WINDIR%\\WBem anyway, so apparently it's invocation for some reason doesn't work.

#7 Updated by Rene Jonchere about 10 years ago

Hello Howard
I agree with your suggestion

Rather than stick with a dinosaur, I really think it would be better to now address this issue with double quotes around long filenames.

but if you edit the file o4w_env.bat you can read command

"REM set path to short OSGEO4W_ROOT Version
for%% i in ("% CD%") do set OSGEO4W_ROOT =%% ~ fsi "

My suggest is a workaround for paths containing blanks and for execute the command File O4W_ENV.bat

cordially

#8 Updated by Jürgen Fischer about 10 years ago

  • Status changed from Open to Feedback

#9 Updated by Jürgen Fischer about 10 years ago

  • Category changed from Browser to Windows Package

#10 Updated by Jürgen Fischer about 10 years ago

  • Target version changed from Version 2.2 to Future Release - Lower Priority

#11 Updated by Giovanni Manghi over 9 years ago

  • Resolution set to worksforme
  • Status changed from Feedback to Closed

closing for lack of feedback, please reopen if necessary.

Also available in: Atom PDF