title: How to get temporary folder for current user
body: <p>Currently I am using following function to get the temporary folder path for current user:</p>
  
  <pre><code>string tempPath = System.IO.Path.GetTempPath();
  </code></pre>
  
  <p>On some machines it gives me temp folder path of current user like: </p>
  
  <blockquote>
    <p>C:\Documents and Settings\administrator\Local Settings\Temp\</p>
  </blockquote>
  
  <p>On some machines it gives me system temp folder path like: </p>
  
  <blockquote>
    <p>C:\Windows\TEMP</p>
  </blockquote>
  
  <p>MSDN Documentation also says that above API returns current system's temporary folder.</p>
  
  <p>Is there any other API available which gives me current user's temporary folder path like this:</p>
  
  <blockquote>
    <p>C:\Documents and Settings\administrator\Local Settings\Temp\</p>
  </blockquote>