Windows 中 ProgramData 文件夹的意义是什么?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9518890/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What is the significance of the ProgramData folder in Windows?
提问by Ullan
What is the importance of the ProgramData
folder in Windows?
ProgramData
文件夹在 Windows 中的重要性是什么?
I have noticed that many installed programs store files in a subdirectory of the ProgramData
folder. Is there a specific reason for that?
我注意到许多已安装的程序将文件存储在ProgramData
文件夹的子目录中。有什么具体原因吗?
I have to create an installer for my application. Should I store user-level files under ProgramData
or under Users
?
我必须为我的应用程序创建一个安装程序。我应该将用户级文件存储在 下ProgramData
还是下Users
?
回答by David Heffernan
The documentationdescribes 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.
包含所有用户的应用程序数据的文件系统目录。典型的路径是 C:\Documents and Settings\All Users\Application Data。此文件夹用于非用户特定的应用程序数据。例如,应用程序可以在 CSIDL_COMMON_APPDATA 文件夹中存储拼写检查字典、剪贴画数据库或日志文件。此信息不会漫游,任何使用计算机的人都可以使用。
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
.
请注意,本文档指的是旧版 Windows 的典型路径。在现代版本的 Windows 中,它位于%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.
令人失望的是,上面的引用来自现在的遗留CSIDL
文档。但是替换文档KNOWNFOLDERID
省略了您打算对这些特殊文件夹执行的操作的有用描述。因此,据我所知,为了深入了解此类问题,您需要参考这两个主题。