Expanding DiskCleanup to purge C:\windows\systemtemp on startup via Registry Edit?

Jeffrey "Aztec" Barnes 0 Reputation points
2023-07-03T18:03:51.85+00:00

I need to delete files in C:\windows\systemtemp on startup. A blog indicated that I may be able to modify DiskCleanup by adding that path using these steps:

Just in case someone wants it. Add an extra folder to this registry path:

@ HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches__Temporary Files__

"FileList"="." is already there, edit the REG_EXPAND_SZ "Folder" and add the path here.

If files are locked they will not be deleted as far as I know.

I can't find independent assurance this will work so I wanted to check here. Can DiskCleanup be used this way?

Windows for business | Windows Server | User experience | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.