Why are there directories called Local, LocalLow, and Roaming under \Users\<username>\AppData?

Why are there directories called Local, LocalLow, and Roaming under \Users\<username>\AppData?

问题

I have a workstation running Windows Server 2008 that's logged into an AD domain, and I have a dual boot with Ubuntu Linux. When running Linux, I'd like to be able to use the same Thunderbird profile I use under Windows, so I pointed Thunderbird to use a profile I found under:

\Users\(myname)\AppData\Local\Thunderbird\Profiles

It turns out it was not the correct profile -- it had the right configuration, but the Inbox was an old version. I eventually found out the correct path was:

\Users\(myname)\AppData\Roaming\Thunderbird\Profiles

What's the rationale behind those different places to store application data?

 

回答1

Roaming is the folder that would be synchronized with a server if you logged into a domain with a roaming profile (enabling you to log into any computer in a domain and access your favorites, documents, etc. Firefox stores its information here, so you could even have the same bookmarks between computers with a roaming profile.

Local is the folder that is specific to that computer - any information here would not be synchronized with a server. This folder is equivalent in Windows XP to C:\Documents and Settings\User\Local Settings\Application Data.

LocalLow is the same folder as local, but it has a lower integrity level. For example, Internet Explorer 8 can only write to the LocalLow folder (when protected mode is on).

This document from Microsoft ("Managing Roaming User Data Deployment Guide") has a long explanation for what these three folder areas are and how they are used, as well as the changes implemented between Windows XP and Vista (Windows 7 retains the Vista structure).

roam是漫游的意思,

 

回答2

Roaming: This folder (%appdata%) contains data that can move with your user profile from PC to PC—like when you’re on a domain—because this data can be synced with a server. For example, if you sign in to a different PC on a domain, your web browser favorites or bookmarks will be available.

Local: This folder (%localappdata%) contains data that can't move with your user profile. This data is typically specific to a PC or too large to sync with a server. For example, web browsers usually store their temporary files here.

LocalLow: This folder (%appdata%/../LocalLow) contains data that can't move, but also has a lower level of access. For example, if you're running a web browser in a protected or safe mode, the app will only be able access data from the LocalLow folder.

The apps themselves choose whether to save to the Local, LocalLow, or Roaming folders. Most desktop apps use the Roaming folder by default, while most Windows Store apps use the Local folder by default.

 

 

Why are there directories called Local, LocalLow, and Roaming under \Users\<username>\AppData?

The directories called Local, LocalLow, and Roaming under \Users<username>\AppData store different types of data for applications that are installed on a user's computer.

  • Local: This folder is used for storing application data that is specific to a particular computer. This data is not synchronized between computers and is not available when the user is offline.

  • LocalLow: This folder is used for storing data from low integrity applications. Low integrity applications are those that do not have the ability to modify system settings or access user data without user consent. This folder is also used to store data from Internet Explorer's Protected Mode.

  • Roaming: This folder is used for storing application data that is synchronized between different computers. This data is available to the user when they log in to another computer using the same account. The Roaming folder is typically used to store user-specific settings and preferences.

The specific data that is stored in each of these folders is determined by the individual applications that use them. However, the use of these folders allows applications to store their data in a standardized way, which makes it easier for users to manage their data and for applications to work together.

 

Show me an example for user clu to demonstrate Difference between Environment.SpecialFolder.ApplicationData and Environment.SpecialFolder.LocalApplicationData and Environment.SpecialFolder.CommonApplicationData

This example creates a test file in the special folders for the current user (in this case, "clu"), and then displays the paths to those folders. Here's what each special folder means:

  • Environment.SpecialFolder.ApplicationData: This folder is intended for application-specific data that roams with the user. Each user has their own application data folder, which is typically located at C:\Users\UserName\AppData\Roaming.
  • Environment.SpecialFolder.LocalApplicationData: This folder is intended for application-specific data that does not roam with the user. Each user has their own local application data folder, which is typically located at C:\Users\UserName\AppData\Local.
  • Environment.SpecialFolder.CommonApplicationData: This folder is intended for application-specific data that is shared between all users on the computer. This folder is typically located at C:\ProgramData.

So, in this example, we create a test file in each of these folders for the user "clu", and then display the paths to those folders. The test.txt file created in the ApplicationData folder will roam with the user to other machines or sessions, while the test.txt file created in the LocalApplicationData folder will only be available on this particular machine or session. The test.txt file created in the CommonApplicationData folder will be shared between all users on the computer.

 

What does it mean by "roam with the user"?

When an application stores data in the ApplicationData folder, that data will follow the user as they roam between different machines or sessions. This means that if a user logs in to a different machine, they will be able to access their application data from the ApplicationData folder.

On the other hand, data stored in the LocalApplicationData folder is specific to the machine on which it was created. This means that if a user logs in to a different machine, they will not be able to access their application data from the LocalApplicationData folder.

 

How does this happen? roam between different machines or sessions, one account login multi machines?

When a user logs into a domain-joined Windows machine, their user profile is loaded from a central location on the network. This allows their profile settings to roam with them when they log into different machines on the domain. When the user logs out, their profile is saved back to the central location on the network, ensuring that any changes they made to their profile are saved and available to them the next time they log in from any machine on the domain.

This roaming feature is particularly useful in environments where users frequently move between different machines or sessions, such as in a corporate setting where employees may work from different locations or workstations. It allows users to have a consistent experience and access to their personal settings and data regardless of which machine they are using.

 

posted @ 2020-07-16 16:46  ChuckLu  阅读(263)  评论(0编辑  收藏  举报