Opened 14 months ago

Last modified 14 months ago

#578 new defect

R detection fails, preventing QGIS.bat from launching desktop app

Reported by: belg4mit Owned by: osgeo4w-dev@…
Priority: major Component: Package
Version: Keywords:
Cc:

Description

etc\ini\batchfiles.bat emits the follow uncaught error, causing qgis.bat and other wrappers to bail

C:\PROGRA~1\QGIS2~1.18>IF EXIST "C:\Program Files\R\" C:\PROGRA~1\QGIS2~1.18\apps\batchfiles\R path

\R\R-2.15.0 was unexpected at this time.

Swapping the order of these two clauses at :: 4a in etc\ini\R.bat from the current order (below) allows things to work:

if not defined R_HOME for /f "tokens=2*" %%a in (

'reg query hklm\software\wow6432Node\r-core\r /v InstallPath 2^>NUL ^| findstr InstallPath' ) do set R_HOME=%%~b

if not defined R_HOME for /f "tokens=2*" %%a in (

'reg query hklm\software\R-core\R /v InstallPath 2^>NUL ^| findstr InstallPath' ) do set R_HOME=%%~b

I don't know why the first one fails, but since it seems to detect older versions of R, it should probably be the fallback and not the first choice anyhow.

C:\Program Files\QGIS 3.2>reg query hklm\software\wow6432Node\r-core\r /v InstallPath

HKEY_LOCAL_MACHINE\software\wow6432Node\r-core\r

InstallPath REG_SZ C:\Program Files (x86)\R\R-2.15.0

C:\Program Files\QGIS 3.2>reg query hklm\software\R-core\R /v InstallPath

HKEY_LOCAL_MACHINE\software\R-core\R

InstallPath REG_SZ C:\Program Files\R\R-3.3.1

Change History (1)

comment:1 Changed 14 months ago by belg4mit

Originally QGIS #16441

Note: See TracTickets for help on using tickets.