Home / Companies / Octopus Deploy / Blog / Post Details
Content Deep Dive

TEMP% has different values for a Windows Service running as Local System

Blog post from Octopus Deploy

Post Details
Company
Date Published
Author
Paul Stovell
Word Count
365
Company Posts That Month
5
Language
English
Hacker News Points
-
Post removed?
No
Summary

Paul Stovell discusses an issue encountered with Windows Services running under the SYSTEM account, where environment variables behave differently than expected. Typically, user-defined environment variables override machine scope values, but when services run as the SYSTEM account, the %TEMP% variable defaults to C:\Windows\TEMP instead of the user-specific path. This anomaly led to a bug in a pre-release version of Octopus Deploy, where environment variables were supposed to update automatically before each script run without restarting the Tentacle windows service. Stovell speculates that this behavior might be a backward compatibility feature for older Windows Services. He notes that services inherit environment variables from their parent processes, with wininit.exe setting TEMP to C:\Windows\TEMP, and mentions that a patch will be released to address the issue.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.