Sunday, May 14, 2017

Why does Windows store temporary files outside the TEMP folder? How to avoid that?


I have seen quite often that Windows (7 and above, maybe even since XP) creates folders with names like 4efc85e3bb644236da736f0e22bfd0 for storing files while an installation is running. Usually it also deletes these folders when the installation has been finished. But sometimes they remain at their place, maybe because the installation routine forgets to delete them or due to failures in the routine, or maybe because Antivirus software blocks access to the files/folder when it's being deleted.


These folders are sometimes created directly on c:\, but also on my data disk d:\ directly at root or in subdirectories, and even on my external usb drives and usb sticks if they're connected when an installation started.
Most times I have seen that it was in connection with Windows Updates. But today I have seen that it happened many times during the installation of Visual Studio 2015, too.


I would not care if deletion of these folders failed if they were put where they belong, which is in the user's TEMP folder or in the Windows TEMP folder.
Why does Windows put them on data disks and external drives?
How can I stop that behaviour?


Basically it's the same question as
https://answers.microsoft.com/en-us/windows/forum/all/windows-writing-temporary-folders-and-files-to/1d933f34-71f1-4def-ab6a-1aa1f0637dad
which has a reply, but you couldn't call that reply an answer.


Answer



These folders are almost always generated by the installation of Microsoft products
or patches.
(Microsoft is the only company that can permit itself such behavior.)


They are not generated in the TEMP folder, since that folder may be subjected to
being cleaned out from time to time, while Microsoft intended them to stay and
not be deleted when TEMP is emptied, as it is possible to
set the TEMP folder to be deleted on every boot.


Some of these folders are used when modifying a product via Control Panel,
for example when installing additional features.
Microsoft Office used to do that a lot, even though this meant doubling
the installation disk space.


They can almost always be deleted without hesitation, as they may either contain
log files or installation files that will automatically be downloaded again
if required.


As to why Microsoft didn't aggregate them in some semi-temp folder,
I can't answer. All I can say is that I see less and less of these folders
with the latest releases of Microsoft products.


No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...