2

I have a user who has some of his temp files being created in the root directory of the C: drive on his Vista notebook.

System Properties > Advanced > Environment Variables > User Variables for USER NAME > TEMP (and TMP) both show "%USERPROFILE%\AppData\Local\Temp"

Under System Variables, they both point to "c:\windows\temp"

If I go to a cmd prompt and type "echo %USERPROFILE%" I get "c:\Users\USER NAME". Typing "echo %TEMP%" gives "c:\Users\USERNA~1\AppData\Local\Temp" as does "echo %TMP%".

I don't see any problems in other environment variables.

Obviously, this user somehow set his root directory to be writeable.

Any explanation why these files are going there and what to do about it?

HopelessN00b
  • 53,795
  • 33
  • 135
  • 209
Dennis Williamson
  • 62,149
  • 16
  • 116
  • 151
  • 1
    Not all programs use the TMP, TEMP variables set by the OS. What are the types of files being saved? It could be something the user installed. – Joseph May 09 '09 at 23:56
  • A bunch of them are empty MSI*.tmp directories going back about nine months. I think you're probably right about the TEMP variables being ignored by something, though, since there are temp files in the correct place during that same time period. However, there are no empty MSI*.tmp directories in the user's temp directory. – Dennis Williamson May 10 '09 at 00:49
  • Have you checked to see if the user has proper permissions for the temp directories? Some programs attempt to work around the problem of TMP/TEMP not being writeable by dumping the tempfiles into the root of the drive. – Avery Payne May 10 '09 at 17:57
  • The user, System and Administrator rights all include all rights. – Dennis Williamson May 10 '09 at 19:34
  • What application is being used? – Daniel A. White May 10 '09 at 20:23
  • In addition to the MSI directories, there are some Visual Studio 2008 installation resource dll files (install.res.*.dll) and corresponding eula.*.txt files. (among others) – Dennis Williamson May 12 '09 at 00:21

1 Answers1

1

Just so I'm understanding this, %USERPROFILE%\AppData\Local\Temp expands into C:\Users\USER NAME\AppData\Local\Temp...which on my Windows 7 Beta install appears to be a valid directory, as well as C:\windows\temp being valid as well.

Could it be that the culprit is attempting to write to C:\windows\temp, which (usually) requires administrative access? (As I mentioned in the commentary) some programs will attempt to dump their files in the root of the C: drive if they can't reach the temp directory.

Avery Payne
  • 14,536
  • 1
  • 51
  • 88
  • c:\windows\temp seems to have the appropriate permissions. It's writable by System, Administrators and Owner-Creator. – Dennis Williamson May 12 '09 at 00:16
  • I don't see Users in that list. If you look at the Advanced permissions on it, and use the Effective Permissions tab, does it report that the user in question has any access to that folder? Or is the user a local administrator, which implies they can get access? – Avery Payne May 12 '09 at 02:05
  • I'm sorry, I should have said that the user and the Owner-Creator are the same for c:\windows\temp. They are also local administrator. So the effective rights are "(e) All of the above" . – Dennis Williamson May 12 '09 at 13:19