Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Our application creates logs in the user's %TEMP% directory. Windows Server 2008 deletes the files on reboot. Is it possible to change this? Say not to delete any files from %TEMP% on reboot?

We do have mechanism to provide a different location for writing logs. I am curious to see if there is a setting that developer/administrator could control.

share|improve this question
3  
The %TEMP% directory is for temporary files. It's name, by its very nature, defines its function. If these logs are needed for the longer term, you need to store them elsewhere. –  Chris J Sep 22 '11 at 8:50
1  
Consider using the system's %TEMP% folder instead. Better yet, place logs in a more appropriate place, such as by creating a logs folder. –  John Gardeniers Sep 23 '11 at 5:46
add comment

3 Answers

up vote 2 down vote accepted

Assuming this is a terminal server...

Group Policy Management Console > Computer Settings > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > "Do not delete temp folder upon exit"

"If the status is set to Enabled, users' per-session temporary folders are retained when the user logs off from a session.

"If the status is set to Disabled, temporary folders are deleted when a user logs off, even if the administrator specifies otherwise in the Remote Desktop Session Host Configuration tool.

"If the status is set to Not Configured, Remote Desktop Services deletes the temporary folders from the remote computer at logoff, unless specified otherwise by the server administrator."

share|improve this answer
add comment

Rather than change your OS's behavior, a better solution would be to make your app not save logs to the user's %TEMP% directory...

share|improve this answer
add comment

As far as I can see, "Windows" does not delete the contents of user's %TEMP% - chances are you've defined a logon/logoff script that does.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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