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
andC:\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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With