[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% .
Advertising
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) – post deleted – , 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.
SilentCleanup mode deletes temporary folders
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).
According to the blog post, disk cleanup runs in SilentCleanup mode when the folder that are referenced by the environment variables
%TEMP% or
%TMP%
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.
Advertising
This problem has been examined since November 9, 2018. Microsoft intends to inform in the article, if a bug fix is available.
A workaround
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..
Start the command prompt in administrator mode and run the following command.
schtasks / change / tn \ Microsoft \ Windows \ DiskCleanup \ SilentCleanup / disable
This should disable disk cleanup in task scheduling. If Microsoft provides a fix, SilentCleanup can be reactivated.
Advertising