Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Win x64] R installation & Registry #28

Closed
myso42 opened this issue Jul 3, 2013 · 4 comments
Closed

[Win x64] R installation & Registry #28

myso42 opened this issue Jul 3, 2013 · 4 comments

Comments

@myso42
Copy link

myso42 commented Jul 3, 2013

I just want to share experience for people who may struggle figuring out which entry in the registry is actually used to select the R install.

My experience is that R entries in windows registry are quite messy and I spent a bit of time figuring out exactly WHICH entry in the registry is used to find R by the type provider.

In my registry (win64), I can find paths to R install in :

HKEY_LOCAL_MACHINE\Software\R-core\R\InstallPath
HKEY_LOCAL_MACHINE\Software\R-core\R[version]\InstallPath
HKEY_LOCAL_MACHINE\Software\R-core\R64\InstallPath
HKEY_LOCAL_MACHINE\Software\R-core\R64[version]\InstallPath
HKEY_LOCAL_MACHINE\Software\Wow6432Node\R-core\R\InstallPath
HKEY_LOCAL_MACHINE\Software\Wow6432Node\R-core\R[version]\InstallPath
HKEY_LOCAL_MACHINE\Software\Wow6432Node\R-core\R32\InstallPath
HKEY_LOCAL_MACHINE\Software\Wow6432Node\R-core\R32[version]\InstallPath

In Visual Studio and for x86 process, the key actually used, on my machine, is
HKEY_LOCAL_MACHINE\Software\Wow6432Node\R-core\R\InstallPath

For a x64 process, it is :
HKEY_LOCAL_MACHINE\Software\R-core\R64\InstallPath

The InstallPath under [version] does not seem be used.

Hope this may help someone.

@sergey-tihon
Copy link
Contributor

According to the R documentation,

When you run the R installer, there are options (under ‘Select Additional Tasks’) to ‘Save version number in registry’ and (for Administrator installs) ‘Associate R with .RData files’.

If you tick the first option, the following string entries are added to the Windows registry:

  • HKEY_LOCAL_MACHINE\Software\R-core\R\Current Version contains the version number, currently 3.0.2.
  • HKEY_LOCAL_MACHINE\Software\R-core\R[version]\InstallPath (where [version] is currently 3.0.2) contains the path to the R home directory.
    If you do not have administrative privileges on the machine while running the installer, then the entries are created under HKEY_CURRENT_USER. The same entries are also created under Software\R-core\R32 or Software\R-core\R64, for 32- and 64-bit R respectively.

I think that we can identify R location relying on the described registry structure.

P.S. On my machine I see the following registry structure:
image

@hmansell
Copy link
Contributor

hmansell commented Oct 4, 2013

Do you believe the RProvider code is not currently identifying the code
according to those rules?

On Tue, Oct 1, 2013 at 1:33 AM, Sergey Tihon notifications@github.comwrote:

According to the R documentationhttp://cran.r-project.org/bin/windows/base/rw-FAQ.html#Does-R-use-the-Registry_003f
,

When you run the R installer, there are options (under ‘Select Additional
Tasks’) to ‘Save version number in registry’ and (for Administrator
installs) ‘Associate R with .RData files’.

If you tick the first option, the following string entries are added to
the Windows registry:

  • HKEY_LOCAL_MACHINE\Software\R-core\R\Current Version contains the
    version number, currently 3.0.2.

  • HKEY_LOCAL_MACHINE\Software\R-core\R[version]\InstallPath (where
    [version] is currently 3.0.2) contains the path to the R home directory. If
    you do not have administrative privileges on the machine while running the
    installer, then the entries are created under HKEY_CURRENT_USER. The same
    entries are also created under Software\R-core\R32 or Software\R-core\R64,
    for 32- and 64-bit R respectively.

    I think that we can identify R location relying on the described
    registry structure.


Reply to this email directly or view it on GitHubhttps://github.com//issues/28#issuecomment-25426504
.

@sergey-tihon
Copy link
Contributor

I see no mention about top level InstallPath in docs. Do you sure that it must be in registry?

@hmansell
Copy link
Contributor

hmansell commented Oct 4, 2013

It always has been when I have done an install.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants