{"id":8142,"date":"2018-12-27T00:58:00","date_gmt":"2018-12-26T23:58:00","guid":{"rendered":"http:\/\/159.69.82.204\/win\/?p=8142"},"modified":"2019-03-22T10:46:06","modified_gmt":"2019-03-22T09:46:06","slug":"windows-server-2019-bug-deletes-temp-folder","status":"publish","type":"post","link":"https:\/\/borncity.com\/win\/2018\/12\/27\/windows-server-2019-bug-deletes-temp-folder\/","title":{"rendered":"Windows Server 2019: Bug deletes Temp folder"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" style=\"float: left; margin: 0px 10px 0px 0px; display: inline;\" src=\"http:\/\/www.borncity.com\/blog\/wp-content\/uploads\/2013\/03\/winb.jpg\" width=\"58\" height=\"58\" \/>[<a href=\"https:\/\/www.borncity.com\/blog\/?p=213217\" target=\"_blank\" rel=\"noopener noreferrer\">German<\/a>]In Windows Server 2019, administrators might run into unfamiliar issues. In <em>SilentCleanup<\/em> mode, Disk Cleanup deletes temporary folders referenced in the environment variables %TEMP% or %TMP% .<\/p>\n<p><!--more--><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/vg05.met.vgwort.de\/na\/e256d46f3d6248e19c50bdb6f642637a\" alt=\"\" width=\"1\" height=\"1\" \/>Blog reader Markus K. has drawn my attention to the article About the problem that the folder set to the environment variable %TEMP% or %TMP% is deleted in the disk cleanup task (SilentCleanup) &#8211; post deleted &#8211; , published by Microsoft Japan (thanks for that). The Ask Core team is tackling a problem affecting Windows Server 2019. I searched the internet because the article is from November 2018. But I didn't find a fix.<\/p>\n<h2>SilentCleanup mode deletes temporary folders<\/h2>\n<p>In Windows Server 2019, there is a bug, causing temporary folders referenced by the environment variable %TEMP% or %TMP% are simply deleted by Disk Cleanup under certain circumstances (not the files, but the folder itself).<\/p>\n<p>According to the blog post, disk cleanup runs in <em>SilentCleanup<\/em> mode when the folder that are referenced by the environment variables<\/p>\n<p>%TEMP% or<br \/>\n%TMP%<\/p>\n<p>is in its initial state and no file exists in the folder. The problem is that Disk Cleanup deletes the temporary folders instead of just emptying them. If the folders of the environment variables %TEMP% and %TMP% are deleted, various applications related to the temporary area won't work. After this, it is no longer possible to work normally until the user logs on again.<\/p>\n<p>This problem has been examined since November 9, 2018. Microsoft intends to inform in the article, if a bug fix is available.<\/p>\n<h1>A workaround<\/h1>\n<p>The folders that the %TEMP% and %TMP% environment variables point to are created at login. A new login solves the issue. Microsoft also suggests that you disable the SilentCleanup task so that the folders are not deleted when you log on..<\/p>\n<p><a href=\"https:\/\/i.imgur.com\/99F54lo.jpg\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" title=\"DiskCleanup SilentCleanup\" src=\"https:\/\/i.imgur.com\/99F54lo.jpg\" alt=\"DiskCleanup SilentCleanup\" width=\"646\" height=\"421\" \/><\/a><br \/>\n(<a href=\"https:\/\/i.imgur.com\/99F54lo.jpg\" target=\"_blank\" rel=\"noopener noreferrer\">Click to zoom<\/a>)<\/p>\n<p>Start the command prompt in administrator mode and run the following command.<\/p>\n<p>schtasks \/ change \/ tn \\ Microsoft \\ Windows \\ DiskCleanup \\ SilentCleanup \/ disable<\/p>\n<p>This should disable disk cleanup in task scheduling. If Microsoft provides a fix, SilentCleanup can be reactivated.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[German]In Windows Server 2019, administrators might run into unfamiliar issues. In SilentCleanup mode, Disk Cleanup deletes temporary folders referenced in the environment variables %TEMP% or %TMP% .<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[463,2],"tags":[47,1498],"class_list":["post-8142","post","type-post","status-publish","format-standard","hentry","category-issue","category-windows","tag-issue","tag-windows-server-2019"],"_links":{"self":[{"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/posts\/8142","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/comments?post=8142"}],"version-history":[{"count":0,"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/posts\/8142\/revisions"}],"wp:attachment":[{"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/media?parent=8142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/categories?post=8142"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/tags?post=8142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}