Skip to Content

Workaround to fix Windows Server 2019 bug: Disk Cleanup / SilentCleanup Deletes Temp Folders

Microsoft Japan Windows Technology Support published a problem that temporary folders referenced by environment variable %TEMP% or %TMP% are deleted by Disk Cleanup task (SilentCleanup mode) under certain circumstances. This problem is affecting Windows Server 2019.

This bug caused temporary folders get deleted instead of just emptying it. If the folders of the environment variables %TEMP% and %TMP% are deleted, various applications related to the temporary area won’t work.

Workaround 1: Re-login Windows again

The folders that %TEMP% and %TMP% environment variables point to are created at login. A new login solves the issue.

Workaround 2: Disable Disk Cleanup in Task Scheduling

Step 1: Start command prompt (CMD) in Administrator mode.
Step 2: Run following command:
schtasks / change / tn \ Microsoft \ Windows \ DiskCleanup \ SilentCleanup / disable

Disable SilentCleanup task in Windows Server 2019

Disable SilentCleanup task in Windows Server 2019


Microsoft Technet: Ask CORE: Microsoft Japan Windows Technology Support: ディスクのクリーンアップタスク (SilentCleanup) にて環境変数 %TEMP% や %TMP% に設定されているフォルダーが削除されてしまう問題について

    Ads Blocker Image Powered by Code Help Pro

    Your Support Matters...

    We run an independent site that\'s committed to delivering valuable content, but it comes with its challenges. Many of our readers use ad blockers, causing our advertising revenue to decline. Unlike some websites, we haven\'t implemented paywalls to restrict access. Your support can make a significant difference. If you find this website useful and choose to support us, it would greatly secure our future. We appreciate your help. If you\'re currently using an ad blocker, please consider disabling it for our site. Thank you for your understanding and support.