The R Project SVN R

Rev

Rev 68948 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 68948 Rev 75092
Line 1... Line 1...
1
% File src/library/utils/man/windows/shortPathName.Rd
1
% File src/library/utils/man/shortPathName.Rd
2
% Part of the R package, https://www.R-project.org
2
% Part of the R package, https://www.R-project.org
3
% Copyright 2008-2014 R Core Team
3
% Copyright 2008-2018 R Core Team
4
% Distributed under GPL 2 or later
4
% Distributed under GPL 2 or later
5
 
5
 
6
\name{readRegistry}
6
\name{readRegistry}
7
\alias{readRegistry}
7
\alias{readRegistry}
8
\title{Read a Windows Registy Hive}
8
\title{Read a Windows Registry Hive}
9
\description{
9
\description{
10
  Read values of keys in the Windows Registry, and optionally whole hives.
10
  On Windows, read values of keys in the Windows Registry, and
-
 
11
  optionally whole hives.
11
}
12
}
12
\usage{
13
\usage{
13
readRegistry(key, hive = c("HLM", "HCR", "HCU", "HU", "HCC", "HPD"),
14
readRegistry(key, hive = c("HLM", "HCR", "HCU", "HU", "HCC", "HPD"),
14
             maxdepth = 1, view = c("default", "32-bit", "64-bit"))
15
             maxdepth = 1, view = c("default", "32-bit", "64-bit"))
15
}
16
}
Line 44... Line 45...
44
}
45
}
45
\note{
46
\note{
46
  This is only available on Windows.
47
  This is only available on Windows.
47
}
48
}
48
\examples{\donttest{
49
\examples{\donttest{
-
 
50
if(.Platform$OS.type == "windows") withAutoprint({
49
## only in HLM if set in an admin-mode install.
51
  ## only in HLM if set in an admin-mode install.
50
try(readRegistry("SOFTWARE\\\\R-core", maxdepth = 3))
52
  try(readRegistry("SOFTWARE\\\\R-core", maxdepth = 3))
51
 
53
 
52
gmt <- file.path("SOFTWARE", "Microsoft", "Windows NT",
54
  gmt <- file.path("SOFTWARE", "Microsoft", "Windows NT",
53
                 "CurrentVersion", "Time Zones",
55
                   "CurrentVersion", "Time Zones",
54
                 "GMT Standard Time", fsep = "\\\\")
56
		   "GMT Standard Time", fsep = "\\\\")
55
readRegistry(gmt, "HLM")}
57
  readRegistry(gmt, "HLM")
56
\dontrun{
58
}) }%donttest
57
## on a 64-bit R need this to find 32-bit JAGS
59
\dontrun{## on a 64-bit R need this to find 32-bit JAGS
58
readRegistry("SOFTWARE\\\\JAGS", maxdepth = 3, view = "32")
60
readRegistry("SOFTWARE\\\\JAGS", maxdepth = 3, view = "32")
59
 
61
 
60
## See if there is a 64-bit user install
62
## See if there is a 64-bit user install
61
readRegistry("SOFTWARE\\\\R-core\\\\R64", "HCU", maxdepth = 2)
63
readRegistry("SOFTWARE\\\\R-core\\\\R64", "HCU", maxdepth = 2)
-
 
64
}
62
}}
65
}
63
\keyword{ utilities }
66
\keyword{ utilities }