Open Registry Key VI

Owning Palette: Windows Registry Access VIs

Requires: Base Development System (Windows)

Opens a reference to a key or subkey in the Windows registry.

Caution  Incorrectly modifying the registry can damage Windows or prevent you from starting Windows.

Example

 Add to the block diagram  Find on the palette
machine is the name of the networked machine. The default is the local machine.
root key is the Windows registry root key.

0HKEY_CLASSES_ROOT
1HKEY_CURRENT_USER
2HKEY_LOCAL_MACHINE
3HKEY_USERS
4HKEY_PERFORMANCE_DATA
5HKEY_CURRENT_CONFIG
6HKEY_DYN_DATA
subkey is the name of a subkey of root key. A beginning backslash character \ might cause an error.
security access mask is the access rights to assign the key.

0KEY_QUERY_VALUE
1KEY_SET_VALUE
2KEY_CREATE_SUB_KEY
3KEY_ENUMERATE_SUB_KEYS
4KEY_NOTIFY
5KEY_CREATE_LINK
6KEY_READ
7KEY_WRITE
8KEY_ALL_ACCESS
9KEY_READ | KEY_WRITE
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
registry view specifies whether to open a 32-bit key or a 64-bit key on a 64-bit operating system.

0Default (default)—LabVIEW selects the type of key based on the version of LabVIEW that is installed. For example, if LabVIEW (64-bit) is installed, LabVIEW opens a 64-bit key.
8KEY_WOW64_32KEY—Opens a 32-bit key.
9KEY_WOW64_64KEY—Opens a 64-bit key.
refnum out is a handle to the open key.
error out contains error information. This output provides standard error out functionality.

Example

Refer to the Windows Registry Manipulation VI in the labview\examples\Connectivity\Windows Registry Access directory for an example of using the Open Registry Key VI.

 Open example  Find related examples