Official Content

Reads information about Windows registry.

Syntax

ReadRegKey( Str1 )
 
Where:
Str1
 Path from where the value should be obtained.

Type Returned:
Character

Scope

Objects: Procedure, Transaction, Web Panel, Work Panel
Generators: .NET, Java, Visual FoxPro (up to GeneXus X Evolution 3)

Description

This function allows having an advanced handling of the Windows registry, so it’s recommended to use it with caution. It returns the value in the registry specified entry .

Samples

The following example shows the use of this function from GeneXus.

Event Start
   &path = 'HKEY_LOCAL_MACHINE\Software\Company'
   &Value = 'C:\Program Files\Application'
EndEvent  // Start

Event 'Save'
   &Ret = WriteRegKey(&Path, &Value) 
EndEvent  // 'save'

Event 'Read'
   &String = ReadRegKey(&Path) 
EndEvent  // Enter

On this example a new String Value under the ‘HKEY_LOCAL_MACHINE\Software’ code is created , whose name is ‘Company’ and its associated value is ‘C:\Program Files\Application’.

See Also

WriteRegKey Function







 

Last update: 2026 | © GeneXus. All rights reserved. GeneXus Powered by Globant