JCL Help:ExpandEnvironmentVar

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Expands the environment variable.


Pascal

 function ExpandEnvironmentVar(var Value: string): Boolean;


Parameters

Parameters Description
var Value: string On input the string which may contain environment variable strings that you want to expand. On exit a copy of the input with environment variables replaced by their system defined value, if they exist.


Return Value

If the function succeeds it returns True, otherwise it returns False. In the latter case the content of Value is undefined.


Description

ExpandEnvironmentVar expands an environment variable. If the variable contains environment variable strings, for example %systemroot%, then these are replaced by the system defined values for that specific variable. If the variable does not exist it is left intact.


See Also

DelEnvironmentVar GetEnvironmentVar GetEnvironmentVars SetEnvironmentVar


About

Unit

JclSysInfo


Donator

Marcel van Brakel (Win32) André Snepvangers (Unix)


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page