LocalUserAppDataPath和UserAppDataPath有什么区别? [英] What is the difference between LocalUserAppDataPath and UserAppDataPath?

查看:344
本文介绍了LocalUserAppDataPath和UserAppDataPath有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

System.Windows.Forms.Application中,有两个属性分别称为LocalUserAppDataPathUserAppDataPath.在此计算机上(运行Vista),这些对应于

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
  • C:\Users\UserName\AppData\Roaming\CompanyName\ProductName\ProductVersion
  • 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?

推荐答案

如果您使用的是域/Active Directory设置,则在用户注销时,可以将漫游配置文件(可以)复制到中央服务器,并从用户登录时访问服务器.

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.

本地配置文件总是本地"存储在PC上.

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

通常最好使用漫游配置文件文件夹,因为这将允许用户使用不同的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.

这篇关于LocalUserAppDataPath和UserAppDataPath有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆