The progress.cfg file can be read by using the showcfgd executable. The following ABL code example executes the
showcfgd executable to read the progress.cfg file in the installation directory.
On Windows platforms it may be necessary to start the session with
Administrator privileges in order for the 'showcfgd.exe' to run correctly.
DEFINE VARIABLE cDLC AS CHARACTER.
DEFINE VARIABLE cExec AS CHARACTER.
DEFINE VARIABLE cTmp AS CHARACTER.
DEFINE VARIABLE cFile AS CHARACTER NO-UNDO.
IF OPSYS = "UNIX" THEN cDLC = OS-GETENV( "DLC" ).
ELSE
GET-KEY-VALUE SECTION "STARTUP" KEY "DLC" VALUE cDLC.
FILE-INFO:FILE-NAME = cDLC.
IF FILE-INFO:FULL-PATHNAME = ? THEN
DO:
MESSAGE "Unable to find DLC" VIEW-AS ALERT-BOX.
END.
/* if the PROCFG Environment Variable is used, add logic here */
IF OPSYS = "UNIX" THEN
cExec = cDLC + "/bin/showcfg " + cDLC + "/progress.cfg".
ELSE
DO:
cExec = cDLC + "\bin\showcfgd.exe " + cDLC + "/progress.cfg > out.txt".
END.
INPUT THROUGH VALUE( cExec ).
IF OPSYS NE "UNIX" THEN
DO:
/* A delay may be needed to allow showcfgd.exe to create 'out.txt' before the client tries to read it */
PAUSE 3 NO-MESSAGE.
cFile = SEARCH("out.txt").
INPUT FROM value(cFile).
END.
REPEAT:
IMPORT UNFORMATTED cFile.
DISPLAY cFile FORMAT "x(60)".
END.
INPUT CLOSE.
For the extra information described in article
How to print more detail on installed OpenEdge license bits add -B after \bin\showcfgd.exe in the above code as follows:
cExec = cDLC + "\bin\showcfgd.exe -B" + cDLC + "/progress.cfg > out.txt".