Consultor Eletrônico



Kbase P184390: GET-KEY-VALUE returns "?" when value data begins with an environment variable
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   18/03/2011
Status: Unverified

SYMPTOM(s):

GET-KEY-VALUE returns "?" when value data begins with an environment variable

GET-KEY-VALUE returns "?" when Windows registry key value data begins with an environment variable such as %ProgramFiles%

FACT(s) (Environment):

Windows
Progress/OpenEdge Product Family

CAUSE:

GET-KEY-VALUE only supports the REG_SZ and REG_DWORD types (it converts REG_DWORD to a character string). REG_EXPAND_SZ requires special handling to expand environment variables and GET-KEY-VALUE doesn't do that special handling.

FIX:

Obtain the value without the use of GET-KEY-VALUE. This might be accomplished by:

Writing a DLL to obtain the value and calling as an external procedure
Using the .NET Microsoft.Win32.Registry class to obtain the value