[Win32utils-devel] GetTempPath vs GetEnvironmentVariable vs getenv
phasis at gmail.com
Mon Mar 24 22:31:53 EDT 2008
2008/3/25, Berger, Daniel <Daniel.Berger at qwest.com>:
> Hi all,
> I discovered some interesting quirks with regards to getting environment
> variable information on Windows. It's because 'TMP' is considered a system
> environment variable, which you can't change with SetEnvironmentVariable()
> according to the docs.
I don't think so. 'TMP' can be changed with SetEnvironmentVariable().
But it affected only the current running process and child processes.
Environment variable can be categorized into three levels: process, user and
You can change user and System environment variable persistently via
> The odd thing about TMP is that my shell value doesn't match the registry
> setting. The 'set' output shows:
> But the registry entry, under
> Manager\Environment, is set to:
User environment variables are stored in the Registry in the key:
System variables are found in the key:
Refer to http://vlaurie.com/computers2/Articles/environment.htm
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the win32utils-devel