| **Navigation:**  [[introduction.htm|Language Reference]] > 13 - Built-in Functions >====== GETREGVALUES (Collect Windows registry key values) ====== | [[getregsubkeys collect registry sub key names .htm|{{btn_prev_n.gif|Previous page}}]][[introduction.htm|{{btn_home_n.gif|Return to chapter overview}}]][[getstate return current state of data file .htm|{{btn_next_n.gif|Next page}}]] | | || **GETREGVALUES**(//root//, //keyName//, //valueQueue//) {{blk2blue.jpg|blk2blue.jpg}} | **GETREGVALUES** | Collect names of values for a given registry key. | | //Root// | A LONG integer, variable or expression that contains the root section of the registry from which to obtain the value. Valid values for this are defined in equates.clw and are as follows: | | | **REG_CLASSES_ROOT** | | | **REG_CURRENT_USER** | | | **REG_LOCAL_MACHINE** | | | **REG_USERS** | | | **REG_PERFORMANCE_DATA** | | | **REG_CURRENT_CONFIG** | | | **REG_DYN_DATA** | | //keyName// | A STRING constant, variable or expression that contains the key name of the key whose value is to be queried. This may contain a path separated by backslash '\' characters. | | //valueQueue// | A reference to a QUEUE that holds the names of the values of the //keyName.// | The** GETREGVALUES** function collect the names of all values for a given registry key specified by the //keyName//. If the requested entry does not exist, an empty string is returned. **Vista and Clarion Built-in Registry Functions** On Vista, a (non-elevated) app can READ the registry key HKLM (local machine) with no problems, but as far as writing to the Registry it needs to use HKCU (current user). If you code sign your executable and run with elevated privileges then you can write to HKLM. **Example:** **  PROGRAM** **  MAP** **  END** **  INCLUDE('EQUATES')** **MyQueue             QUEUE,PRE(my)** **RegValues               STRING(40)** **                    END** **  CODE** **   GETREGVALUES(REG_CURRENT_USER,'Control Panel\Current',MyQueue)** **  ** **   LOOP I# = 1 TO RECORDS(MyQueue)** **        GET(MyQueue,I#)** **        MESSAGE(my:RegValues) !Displays "Color Schemes"** **   END** **See Also:** [[getreg get windows registry entry .htm|GETREG]], [[getregsubkeys collect registry sub key names .htm|GETREGSUBKEYS]]