I have a file that writes constantly to my TempDirectory. I have set the TempDirectory to C:\Users{Username}\AppData\Local\Temp but my files are written to C:\Users{Username}\AppData\Local\Temp \3

Why does Windows change the TempDirectory ? I am using a Windows Server 2008 R2 I am Admin on this Server

If I go to the CMD and type %temp% it prints the \3 directory


Tmp Environment variables

Check the variables on the picture in the link above on your system if some of them points to C:\Users{Username}\AppData\Local\Temp\3 then you will need to change it to point to C:\Users{Username}\AppData\Local\Temp

  • As said above, quote: "I have set the TempDirectory to C:\Users{Username}\AppData\Local\Temp" which I have done via the Environment Variables. Sadly this isn't the problem – Bongo Apr 20 '16 at 8:41
  • Please read the question again carefully. Your answer does not answer the original question. – DavidPostill Apr 20 '16 at 8:46
  • @Bongo To answer your original question: I don't believe that the windows itself is changing the variable. There are two TEMP variables actually one for your current user and one system variable The one that you were setting is for your user only the other one can be found in the list of System variables below – Filip Shulevski Apr 20 '16 at 9:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.