Difference between 'SpecialFolder.LocalApplicationData' and 'SpecialFolder.ApplicationData'?

后端 未结 3 1985
故里飘歌
故里飘歌 2020-12-04 23:37

On my system, %AppData% leads to ApplicationData which is C:\\Users\\\\AppData\\Roaming

But there is also C:

3条回答
  •  没有蜡笔的小新
    2020-12-05 00:26

    From MSDN - Environment.SpecialFolder Enumeration:

    ApplicationData - The directory that serves as a common repository for application-specific data for the current roaming user. A roaming user works on more than one computer on a network. A roaming user's profile is kept on a server on the network and is loaded onto a system when the user logs on.

    LocalApplicationData The directory that serves as a common repository for application-specific data that is used by the current, non-roaming user.

    In short, use ApplicationData for roaming profiles, and LocalApplicationData for non roaming profiles.

提交回复
热议问题