Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between LocalUserAppDataPath and UserAppDataPath?

In System.Windows.Forms.Application there are two properties called LocalUserAppDataPath and UserAppDataPath. On this computer (running Vista) these corresponds to

  • C:\Users\UserName\AppData\Local\CompanyName\ProductName\ProductVersion and
  • C:\Users\UserName\AppData\Roaming\CompanyName\ProductName\ProductVersion

What is the difference between these two? When would you use the first and when would you use the second?

like image 921
Svish Avatar asked Jan 23 '23 01:01

Svish


1 Answers

If you are on a Domain / Active Directory setup, the Roaming profile (can be) is copied to a central server when the user logs out, and from the server when the user logs in.

The local profile is always stored 'locally' on the PC.

Its generally better to use the Roaming profile folder as that will allow users to use different PCs and still access their data. If the data is very large however, store it locally to prevent slow logins.

like image 127
Chris Becke Avatar answered Feb 02 '23 22:02

Chris Becke