1

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.

8
  • Why does Windows put them on data disks and external drives? Windows stores nothing. It only tells to a program where it can store tempfiles - but the program may ignore it freely. How can I stop that behaviour? You can alter program behavior by command-line switch or by editing its INI file if both or one of this possibilities exists, otherwise no chance.
    – Akina
    Feb 28, 2019 at 11:54
  • @Akina: No, tempfiles are always generated in the TEMP folder.
    – harrymc
    Feb 28, 2019 at 11:56
  • Well, these specific folders are almost universally created by Microsoft-issued updates or runtime library installers, so you could argue they are part of Windows... Feb 28, 2019 at 11:56
  • @grawity: That's exactly my way of thinking. I know that installers are free to put files where they want, but it's always installers of components for Microsoft Windows that don't stick to their own rules. Feb 28, 2019 at 11:58
  • @harrymc GetTempFileNameA/GetTempFileNameW creates a name for temp file. A folder where to create it is a parameter. App can, of course, get temp folder via GetTempPathA/GetTempPathW, but it's not must. Microsoft Docs claims: "Applications typically specify a period (.) for the current directory or the result of the GetTempPath function".
    – Akina
    Feb 28, 2019 at 12:02

1 Answer 1

1

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.

8
  • These folders are almost always generated by the installation of Microsoft products or patches. Many drivers do so too. Especially WHQLs.
    – Akina
    Feb 28, 2019 at 12:13
  • @Akina: I haven't encountered many driver installations that didn't ask where to store their temp files.
    – harrymc
    Feb 28, 2019 at 12:15
  • Okay, makes sense. And not placing all of them in one single dedicated folder, is just stupid in my opinion. But why are they placed on external drives? What is going so wrong here? Feb 28, 2019 at 12:16
  • 1
    Microsoft has some weird algorithm that is supposed to allocate them on disks that will not cause future problems. They try to stay out of the system disk, since free space there is important for the functioning of Windows.
    – harrymc
    Feb 28, 2019 at 12:19
  • 1
    Don't expect logic here. Some Microsoft programmer did it this way and didn't think too much about what he was doing.
    – harrymc
    Feb 28, 2019 at 12:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .