resolveToplevelRegistryKey: Hierarchical Registry Path Specification

.resolveToplevelRegistryKeyR Documentation

Hierarchical Registry Path Specification

Description

This function is used in all of the registry functions in this package to identify a key within the registry. The basic philosophy is to allow easy ways to specify a position in the registry for both interactive and programmatic use. There are 2 basic approaches which are then combined with two ways to specify the starting point. The two basic ways are to a) specify the path via a single string whose path elements are separated by \\; or b) to specify the path elements as separate elements of a character vector.

One can specify the entire path in either of these ways, that is starting at the top-most node in the registry, e.g HKEY_CURRENT_USER, HKEY_CLASSES_ROOT, ... Alternatively, one can specify the top-most node of interest via the top argument and give the path from the node in either of these two ways.

Usage

.resolveToplevelRegistryKey(top, path)

Arguments

top

the name of one of the top-level keys in the registry such as HKEY_CURRENT_USER, HKEY_CLASSES_ROOT, etc. If one wants to specify this in the path argument, pass this as NULL or ""

path

the path of keys in the registry given as a single string with elements separated by \\ or a character vector with an per key in the path

Value

A list with the top-level key name and the sub-path from that given as a string with keys separated by \\. This is then used by the C code to identify the package.

Author(s)

Duncan Temple Lang <duncan@wald.ucdavis.edu>

References

http://www.omegahat.org/SWinRegistry

See Also

getRegistryValue setRegistryValue

createRegistryKey deleteRegistryKey flushRegistryKey

getRegistryKeyValues getRegistrySubKeyNames

Examples

#  .resolveToplevelRegistryKey("", "HKEY_CURRENT_USER\\b\\c")
  .resolveToplevelRegistryKey("HKEY_CURRENT_USER", "a\\b\\c")
  .resolveToplevelRegistryKey("HKEY_CURRENT_USER", c("a","b", "c"))

omegahat/SWinRegistry documentation built on July 17, 2022, 7:26 p.m.