Loadable Function: [ rv, code ] = win32_ReadRegistry (key, subkey, value)

Read a value from the Windows registry.

Example:

key='SOFTWARE\\Cygnus Solutions\\Cygwin\\mounts v2';
win32_ReadRegistry('HKLM',key,'cygdrive prefix')

key must be one of the following strings:

HKCR

HKEY_CLASSES_ROOT

HKCU

HKEY_CURRENT_USER

HKLM

HKEY_LOCAL_MACHINE

HKU

HKEY_USERS

rv is an octave string of the returned bytes. This is a natural format for REG_SZ data; however, if the registry data was in another format, REG_DWORD then the calling program will need to process them

code is the success code. Values correspond to the codes in the winerror.h header file. The code of 0 is success, while other codes indicate failure In the case of failure, ’rv’ will be empty

Package: windows