I recently briefly changed my temp directory in an attempt to fix a problem with Python and Anaconda, but it's back to the default now (C:\Users\Rob\AppData\Local). I'm almost certain that's the original cause of the problem. It seems unlikely that malware is involved, and I don't run any shady .exe downloads. This happens every week or so.
Sometimes Wox and sometimes Obsidian need to be reinstalled, because their executables are located in AppData\Local (%temp%). Same with Brave's (Chrome-based) extensions, which prompt me to "repair now". I've even lost my game progress in Returnal. There seems to be no pattern to the folders which get deleted.
C:\ has 73 gigabytes of storage available. I've checked SMART data (wmic diskdrive get status) and got the result "OK" for each disk. chkdsk C: returns: "Windows has scanned the file system and found no problems. No further action is required."
My system environment variables' TEMP and TMP are both set to C:\WINDOWS\TEMP. My user environment variables' TEMP and TMP are both set to C:\Users\Rob\AppData\Local.
As of writing, I had this happen this morning, and the Local folder is currently 3.87 gigabytes.
Anyway, I'd like to know why this happens and how to fix it. This seems like it's some simple built-in Windows thing responding incorrectly to my abuse of the env variables.