What is the significance of the ProgramData folder in Windows?

前提是你 提交于 2019-11-27 12:54:09

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/9518890/what-is-the-significance-of-the-programdata-folder-in-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!