| Summary | This article clarifies how to access environment variables from the Orbix configuration. |
|---|---|
| Environment |
Orbix 6.3 Windows Operating Systems |
| Question/Problem Description |
How to access environment variables from the Orbix configuration? Is it possible to access environemnt variables from within the Orbix configuration file or configuration repository? |
| Clarifying Information | |
| Error Message | |
| Defect/Enhancement Number | |
| Cause | |
| Resolution |
Orbix does not provide direct access to Windows environment variables from within the Orbix configuration or configuration repository. Defining a following statement in the Orbix configuration does not work: MY_USER_DIR = "C:\\Users\\%USERNAME%"; |
| Workaround |
A possible workaround is to pass the variable into the process via the -ORB parameter, e.g as follows: > server.exe -ORBMY_USER_DIR C:\\Users\\%USERNAME% The code snipped below shows how to access this variable from the server mainline: ... Running the above code will produce the following output: >server -ORBMY_USER_DIR c:\\Users\\%USERNAME% Initializing the ORB |
| Notes | |
| Attachment |
#Orbix
#KnowledgeDocs