Support for Windows environment variables in ExeOutput

Is there a way to access environmental variables from ExeOutput?

I’m talking about variables outlined here:

Ex. %TEMP%, %WINDIR%, %APPDATA%, etc.

For example, this works:
$cont = file_get_contents(‘C:\Windows\System32\drivers\gmreadme.txt’, FILE_USE_INCLUDE_PATH);

But this doesn’t work:
$cont = file_get_contents(’%WINDIR%\System32\drivers\gmreadme.txt’, FILE_USE_INCLUDE_PATH);

Please advise.


PHP on Windows itself already has a lot of Windows variables and system information. Try a phpinfo() call to see all of the variables.