Highlighted
Absent Member.
Absent Member.
973 views

dd_ variable

Where can i set this  variable in managed console application?  in native console application I put it in enviroment

0 Likes
1 Reply
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: dd_ variable

Setting environment variables used for file assignments can be done in a number of locations. You can set them at the system level using Control Panel or they can be set in a .bat file prior to opening Visual Studio. Within the IDE you can set then on the property page on the Application tab using the environment button  but this will only set them for use when running within the IDE. A better location to set these would be in an application.config file that is stored in the same folder as the executable. This way it will be picked up when running your application inside the IDE and outside the IDE (in production).

Right-click your project name and select Add-->New Item and then select Application.configuration file to add one to your project. You can then add environment variables to this file by right-clicking on the app.config and selecting Edit and using the environment tab.

This can be used in managed code as well as native code projects although they work a little differently. An app.config is only picked up for your main application so it should be set in your main programs project.

An alternative to this approach is to use the MFEXTMAP.DAT file which associates internal files to external file names. This is documented in the file handling section here:

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.