views:

330

answers:

2

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?

+1  A: 

The non-local user are settings that (in many network user configurations) will be transferred to any machine no matter where the user logs in. The local user, on the other hand, is specific to the machine on which the user is currently logged in and will not be transferred to other machines on a domain if the user logs in elsewhere (i.e. no synchronization of this data across the network by Windows).

Which to use depends on what you think a user will want functionality-wise for any given item.

Amber
+1  A: 

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.

Chris Becke