What is the Programdata/Application Data folder?

北战南征 提交于 2019-12-13 02:13:21

问题


So I am writing an application that iterates through a specified directory tree and I was experimenting with the exception that handles permissions for folder access and there was one folder I came across that the compiler returned that had the directory of C:\ProgramData\Application Data

Does anyone know what this folder is? It doesn't seem to exist within Windows Explorer. Like, the folder isn't there. It's not hidden. It just isn't there. I was able to get inside the folder using an elevated command prompt but when I used the "dir" command to see what the folder contained, CMD returned:

"Directory of C:\ProgramData\Application Data

File Not Found"

I am curious to know what this folder is.....


回答1:


The dir /a command is your friend here:

C:\ProgramData>dir /a
 Volume in drive C has no label.
 Volume Serial Number is 848A-BBB7

 Directory of C:\ProgramData

23/05/2015  03:38 pm    <DIR>          .
23/05/2015  03:38 pm    <DIR>          ..
14/05/2015  10:28 pm    <JUNCTION>     Application Data [C:\ProgramData]

As you can see, Application Data is a junction point which points back to ProgramData. Windows includes a number of similar junction points, for backwards compatibility with older applications.

The security permissions on the junction point explicitly prohibit listing files, which is why you can't get a listing of its contents:

C:\ProgramData>icacls "Application Data" /L
Application Data Everyone:(DENY)(S,RD)
                 Everyone:(RX)
                 NT AUTHORITY\SYSTEM:(F)
                 BUILTIN\Administrators:(F)

Also, the junction point is marked System and Hidden:

C:\ProgramData>attrib /L "Application Data"
   SH   I    C:\ProgramData\Application Data

which is why Explorer doesn't show it. (It appears that Explorer does not show junction points marked hidden and system, even if configured to show hidden items.)



来源:https://stackoverflow.com/questions/31352461/what-is-the-programdata-application-data-folder

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