EVOLUTION-MANAGER
Edit File: readRegistry.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Read a Windows Registry Hive</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for readRegistry {utils}"><tr><td>readRegistry {utils}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Read a Windows Registry Hive</h2> <h3>Description</h3> <p>On Windows, read values of keys in the Windows Registry, and optionally whole hives. </p> <h3>Usage</h3> <pre> readRegistry(key, hive = c("HLM", "HCR", "HCU", "HU", "HCC", "HPD"), maxdepth = 1, view = c("default", "32-bit", "64-bit")) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>key</code></td> <td> <p>character string, the path to the key in the Windows Registry.</p> </td></tr> <tr valign="top"><td><code>hive</code></td> <td> <p>The ‘hive’ containing the key. The abbreviations are for <code>HKEY_LOCAL_MACHINE</code>, <code>HKEY_CLASSES_ROOT</code>. <code>HKEY_CURRENT_USER</code>, <code>HKEY_USERS</code>, <code>HKEY_CURRENT_CONFIG</code> and <code>HKEY_PERFORMANCE_DATA</code></p> </td></tr> <tr valign="top"><td><code>maxdepth</code></td> <td> <p>How far to recurse into the subkeys of the key. By default only the values of the key and the names of subkeys are returned.</p> </td></tr> <tr valign="top"><td><code>view</code></td> <td> <p>On 64-bit Windows, the view of the Registry to be used: see ‘Details’.</p> </td></tr> </table> <h3>Details</h3> <p>Registry access is done using the security settings of the current <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> session: this means that some Registry keys may not be accessible even if they exist. This may result in <code>NULL</code> values in the object returned, and, possibly, empty element names. </p> <p>On 64-bit Windows, this will by default read the 32-bit view of the Registry when run from 32-bit <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>, and the 64-bit view when run from 64-bit <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>: see <a href="https://msdn.microsoft.com/en-us/library/aa384232(VS.85).aspx">https://msdn.microsoft.com/en-us/library/aa384232(VS.85).aspx</a>. </p> <h3>Value</h3> <p>A named list of values and subkeys (which may themselves be named lists). The default value (if any) precedes named values which precede subkeys, and both the latter sets are sorted alphabetically. </p> <h3>Note</h3> <p>This is only available on Windows. </p> <h3>Examples</h3> <pre> if(.Platform$OS.type == "windows") withAutoprint({ ## only in HLM if set in an admin-mode install. try(readRegistry("SOFTWARE\\R-core", maxdepth = 3)) gmt <- file.path("SOFTWARE", "Microsoft", "Windows NT", "CurrentVersion", "Time Zones", "GMT Standard Time", fsep = "\\") readRegistry(gmt, "HLM") }) ## Not run: ## on a 64-bit R need this to find 32-bit JAGS readRegistry("SOFTWARE\\JAGS", maxdepth = 3, view = "32") ## See if there is a 64-bit user install readRegistry("SOFTWARE\\R-core\\R64", "HCU", maxdepth = 2) ## End(Not run) </pre> <hr /><div style="text-align: center;">[Package <em>utils</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>