What is the significance of the ProgramData folder in Windows?
Asked Answered
I

1

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?

Idell answered 1/3, 2012 at 15:25 Comment(0)
B
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.

Buckling answered 1/3, 2012 at 15:29 Comment(10)
Ah, this is much better than what I came up with!Hydrophobic
@Hydrophobic 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.Buckling
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.Ptisan
@Ptisan That's true now, simply because AllData is a symlink to ProgramData for backwards-compatibility reasons. Previously there was no ProgramData folder.Photozincography
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?Peirsen
@Peirsen Delete it and expect many of your installed programs to stop workingBuckling
Ouch! I used this cute little utility 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! :)Peirsen
Why would we use ProgramData instead of Program Files for "application data" ?Gq
@Dave Because the former is for data and the latter for the program. The latter only changes at installation time.Buckling
@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. ThanksGq

© 2022 - 2024 — McMap. All rights reserved.