Setting Variables on Windows Agent Machines

1 minute read

On Windows agent machines, the %TMP%, %TEMP%, and %USERPROFILE% environment variables cannot have folder names with spaces. Job steps on these agents might run that require temporary files to be stored in %TMP% (such as during during program installations and uninstallations and CI builds). In addition, %TMP%, %TEMP%, and %USERPROFILE% also might contain files that might have been unzipped, downloaded, or placed as part of the job steps. Several ”working” programs used as part of the job step will store folders and files there during their normal operations. If these variables have spaces, then those job steps might fail.

If the folders set by %TMP%, %TEMP%, and %USERPROFILE% do have spaces in the folder names, then you must change these variable values using the 6chars~1 format. For example, use:

TMP=C:\DOCUME~1\svcrelmg\LOCALS~1\Temp

instead of:

TMP=C:\DOCUMENTS Settings\svcrelmg\Local Settings\Temp