55

What is the importance of the ProgramData folder in Windows?

I have noticed that many installed programs store files in a subdirectory of the ProgramData folder. Is there a specific reason for that?

I have to create an installer for my application. Should I store user-level files under ProgramData or under Users?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Ullan
  • 1,311
  • 8
  • 21
  • 34

1 Answers1

58

The documentation describes the expected use of this folder like this (emphasis mine):

The file system directory that contains application data for all users. A typical path is C:\Documents and Settings\All Users\Application Data. This folder is used for application data that is not user specific. For example, an application can store a spell-check dictionary, a database of clip art, or a log file in the CSIDL_COMMON_APPDATA folder. This information will not roam and is available to anyone using the computer.

Note that this documentation refers to the typical path as per older versions of Windows. In modern versions of Windows it is located in %SystemDrive%\ProgramData.

Rather disappointgly, the above quote is from the now legacy CSIDL documentation. But the documentation for the replacement KNOWNFOLDERID omits the useful descriptions of what you are intended to do with these special folders. So, in order to get to the bottom of questions like this you need to refer to both topics, so far as I can tell.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
  • Ah, this is much better than what I came up with! – Jon Mar 01 '12 at 15:31
  • @Jon On the other hand, your MSDN link does at least have an up-to-date typical path for `CSIDL_COMMON_APPDATA`/`FOLDERID_ProgramData`. This is one area of MSDN that is rather opaque in my view. – David Heffernan Mar 01 '12 at 15:36
  • 12
    Just to clarify the above: "C:\Users\All Users\" and "C:\ProgramData\" are one and the same. Putting a file in one shows it in the other. – thedrs Nov 15 '14 at 18:24
  • 2
    @thedrs That's true now, simply because AllData is a symlink to ProgramData for backwards-compatibility reasons. Previously there was no ProgramData folder. – alexh Jan 08 '16 at 23:13
  • So a million dollar question. Can we delete it to save some space. On my drive it is taking huge 90.9 GB ? Will it affect any of the programs that are installed? – Sid Jul 11 '16 at 10:40
  • @Sid Delete it and expect many of your installed programs to stop working – David Heffernan Jul 11 '16 at 10:42
  • Ouch! I used this [cute little utility](http://windirstat.info/) to explore what's eating my space. Turns out MySQL which I don't use now, consumed the most of it, has its data inside ProgramData, deleted it to gain space. Thanks for the heads up! :) – Sid Jul 11 '16 at 10:55
  • Why would we use ProgramData instead of Program Files for "application data" ? – StayOnTarget Nov 22 '19 at 19:32
  • @Dave Because the former is for data and the latter for the program. The latter only changes at installation time. – David Heffernan Nov 22 '19 at 19:38
  • @DavidHeffernan I see, you are referring to data which gets updated at runtime, as opposed to static data installed with the program. The examples in the quote actually didn't strike me as that type - clip art for instance probably doesn't get modified later. Thanks – StayOnTarget Nov 22 '19 at 20:03