DEV Community

Корчеватель
Корчеватель

Posted on

Windows apps directories

Where the app should store its per use data on Windows?

If you go to your C:\Users\<username>\AppData you can see that there are 3 folders are there:

  • Local
  • LocalLow
  • Roaming

It looks like the folder Local is where the apps suppose to store their data now. You can get WinAPI SHGetKnownFolderPath() providing the FOLDERID_LocalAppData as known path id. I have found this discussion https://github.com/electron/electron/issues/1404 relevant.

But what are the other folders?

The LocalLow is for processes that runs in a low integrity mode, this is where this "low" comes from. Processes that runs in low integrity mode are not allowed to access objects that has a higher integrity level, so they cannot write or read to Local therefore there is a directory for it.

The Roaming directory does work when there is enterprise and Activity Directory. Data in Roaming copied on computer from AD when user logs in. It sounded like a good idea that your are logging to another computer in office and still has your personal apps configuration. According to MS docs it is deprecated in Windows 11.

Many dev apps on my computer do not use "AppData/Local" and save the data in %UserProfile% in a folder like "c:\Users<username>.vscode" and it seems to work fine for them.

Top comments (0)