|
Previous Top Next |
Prototype: | (String pSt, Byte pReturnEmpty=0),String |
pSt | Environment string to expand |
pReturnEmpty | Return an empty string if the environment variable is empty |
Returns | The expanded environment string |
This method is used to take a string that contains an environment variable, such as %PATH% and expand it. The environment variable can be the entire string or it can be just part of it. For example '%PATH%' or 'The path contains "%PATH%".'
Example:
ITS ITShellClass
Loc:EnvStringToExpand String(255)
Code
Loc:EnvStringToExpand = '%SystemRoot%\System32\taskmgr.exe'
Loc:EnvStringToExpand = ITS.ExpandEnvString(Loc:EnvStringToExpand)
Message('Expanded string: ' & Loc:EnvStringToExpand)
This would result in a message similar to this:
See also: