{"id":92661,"date":"2015-12-16T07:00:00","date_gmt":"2015-12-16T22:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/?p=92661"},"modified":"2019-03-13T12:22:55","modified_gmt":"2019-03-13T19:22:55","slug":"20151216-00","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20151216-00\/?p=92661","title":{"rendered":"You&#8217;d think that with the name TEMP, people wouldn&#8217;t expect it to be around for a long time"},"content":{"rendered":"<p>A customer had a problem with the Disk Cleanup wizard. The customer liaison explained: <\/p>\n<blockquote CLASS=\"q\"><p>The customer would like to know what locations the Disk Cleanup wizard removes files from. The custom is running Application Q. They had a previous incident where they incurred significant downtime because the Disk Cleanup wizard deleted files from <code>C:\\Windows\\Installer<\/code> and <code>C:\\Temp<\/code> that caused their application to stop working. When will the Disk Cleanup Wizard <a HREF=\"http:\/\/support.microsoft.com\/kb\/2852386\">remove a Windows update<\/a>? <\/p><\/blockquote>\n<p>Okay, we can talk about how the cleanup of outdated Windows updates works, but <i>holy crap<\/i> did you say that Application Q stores critical information in the <code>C:\\Temp<\/code> directory? <\/p>\n<p>You cannot assume that any files in the Temp directory will exist for any significant length of time. The name Temp stands for Temporary. Temporary means <i>not permanent<\/i>. If your application puts critical files in the Temp directory, then it is just asking for trouble. <\/p>\n<p>If you need a permanent place to store your critical information, try a subdirectory of the <a HREF=\"http:\/\/blogs.msdn.com\/b\/cjacks\/archive\/2008\/02\/05\/where-should-i-write-program-data-instead-of-program-files.aspx\">Local Application Data<\/a> directory. <\/p>\n<p>Okay, going back to the questions about Windows updates: The Disk Cleanup Wizard removes up a Windows update if it has been superseded by another update. For example, there may be a roll-up update that includes the original update. <\/p>\n<p>But I doubt that&#8217;s what made Application Q stop working. I bet it&#8217;s assuming that files in a temporary directory have permanent storage duration. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Temp stands for Temporary.<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[25],"class_list":["post-92661","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>Temp stands for Temporary.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/92661","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=92661"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/92661\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=92661"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=92661"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=92661"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}