Reading the set temp and set tmp environment or something equivalent

  • Thread starter Thread starter Ioannis Vranos
  • Start date Start date
I

Ioannis Vranos

Is there any way to find out the current user's directory temp paths in
..NET applications?


For example to read the set variables which in my account are:


TEMP=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp
TMP=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp



or another way to retrieve that information?
 
Ioannis said:
Is there any way to find out the current user's directory temp paths
in .NET applications?


For example to read the set variables which in my account are:


TEMP=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp
TMP=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp



or another way to retrieve that information?

For native C++, use getenv() from <stdlib.h>

For managed, use System::Environment::GetEnvironmentVariable from mscorlib.

-cd
 
Back
Top