[ESS] ESS M-x R failing in a Windows installation

Sparapani, Rodney r@p@r@p@ @end|ng |rom mcw@edu
Wed Mar 10 19:28:37 CET 2021


Hi Gang:

Just to follow-up on my own post.  I see that the Windows
Registry was discussed here in June of 2012 and March of
2013 (not 2004 which was my initial guess).  But, whether
that even exists in modern Windows, IDK!

Here are the most relevant snippets…

On 06/15/2012 12:06 PM, Rodney Sparapani wrote:
> Hi Paul:
>
> Very nice thoughts. I'm just going to react to this part which seems
> to be the most straightforward. I think you can call this from elisp.
> But, the problem with this code is that it doesn't work, does it? Here's
> what I get on Windows XP:
>
> H:\>reg query hklm\software\R-core\R /v InstallPath
>
> Error: The system was unable to find the specified registry key or value
>
> H:\>reg query hklm\software\wow6432Node\r-core\r /v InstallPath
>
> Error: The system was unable to find the specified registry key or value
>
> What do you see?
>
> Rodney
>

Oh, hang on.  For me, I need

H:\>reg query hkcu\software\R-core\R /v InstallPath
! REG.EXE VERSION 3.0

HKEY_CURRENT_USER\software\R-core\R
     InstallPath REG_SZ C:\Documents and Settings\rsparapa.MCWCORP\My
Documents\R\R-2.14.2

Ok, I think I see what is going on.  You need to check each ROOTKEY
[ HKLM | HKCU | HKCR | HKU | HKCC ]

REG QUERY KeyName [/v ValueName | /ve] [/s]

   KeyName    [\Machine\]FullKey
     Machine - Name of remote machine,  omitting defaults to the current
machine
          Only HKLM and HKU are available on remote machines
     FullKey  - in the form of ROOTKEY\SubKey name
          ROOTKEY  [ HKLM | HKCU | HKCR | HKU | HKCC ]
          SubKey  - The full name of a registry key under the selected
ROOTKEY
   /v  query for a specific registry key
          ValueName  - The name, under the selected Key, to query
          if omitted, all values under the Key are queried
   /ve query for the default value or empty value name <no name>
   /s  queries all subkeys and values

So, that code is incomplete.  But, it could easily be adapted.

Rodney

On 03/28/2013 01:42 PM, Ross Boylan wrote:
> BTW, the path is available in the registry at
> HKEY_CURRENT_USER\Software\R-core\R\2.15.3 under InstallPath.  There is
> also an entry that uses \R32\ instead of \R\ in the registry tree.

Something like this has been suggested before (for example, see the
discussion from June 15th).  There are a few problems here:

1) Generally, ESS developers are not cracker-jack Windows developers.
2) There have been MAJOR changes in Windows especially 7 and 8
which may (or may not) be at issue here; for example, multi-user
installs of ESS require omniscience.
3) it is not obvious to me why we need to search both the
HKLM and HKCU root keys (and perhaps others as well?!?).

So, I don't see this suggestion being acted on UNLESS there is
a Windows developer lurking out there who wants to work on ESS.
But, thanks anyways ;o)
--
Rodney Sparapani, Associate Professor of Biostatistics
Chair ISBA Section on Biostatistics and Pharmaceutical Statistics
Institute for Health and Equity, Division of Biostatistics
Medical College of Wisconsin, Milwaukee Campus


	[[alternative HTML version deleted]]



More information about the ESS-help mailing list