www.icetips.com  Icetips Utilities Documentation 6/29/2009    

Shell Class:  ExpandEnvString

Previous  Top  Next  


Prototype: (String pSt, Byte pReturnEmpty=0),String

 

pStEnvironment string to expand
pReturnEmptyReturn an empty string if the environment variable is empty

 

ReturnsThe 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:

 

ShellClass - Expanded String message

See also:

SetEnvVar

 



Direct link to this page: http://www.icetips.com/manuals/utilities/expandenvstring_shellclass.htm