Environment Variable for AppData\Local / Access Downloaded custom assemblies

Windows 7TfsbuildWindows Server-2008-R2

Windows 7 Problem Overview


I am trying to setup my TFS2010 Build and I want to access the files that are downloaded via the "Version control path to custom assemblies".

From what I can tell those files are downloaded to:

C:\User\<Build User>\AppData\Local\BuildAgent\<Built Agent Number>

I can directly access that folder via the above path, but it would be nice if there was an environment variable (or something I can use in the build) to access that folder indirectly.

Or... Is there a better way to get at these files? (I am putting a version file in there to be downloaded every time the build is run).

Windows 7 Solutions


Solution 1 - Windows 7

You can use %LOCALAPPDATA% environment variable. It expands to

> RootDrive:\User\LoggedInUser\AppData\Local


Example: %LOCALAPPDATA%\BuildAgent


Note that %APPDATA% will expand to

> RootDrive:\User\LoggedInUser\AppData\Roaming

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionVaccanoView Question on Stackoverflow
Solution 1 - Windows 7swatkatView Answer on Stackoverflow