Function Reference


_WinAPI_ExpandEnvironmentStrings

Expands environment variable strings and replaces them with their defined values

#include <WinAPISys.au3>
_WinAPI_ExpandEnvironmentStrings ( $sString )

Parameters

$sString String to convert for environment variables

Return Value

Success: Converted string
Failure: Set the @error flag to non-zero, call _WinAPI_GetLastError() to get extended error information

See Also

Search ExpandEnvironmentStrings in MSDN Library.

Example

#include <MsgBoxConstants.au3>
#include <WinAPISys.au3>

MsgBox($MB_SYSTEMMODAL, "Environment string", "%windir% = " & _WinAPI_ExpandEnvironmentStrings("%windir%"))