`
looyo
  • 浏览: 59016 次
  • 性别: Icon_minigender_1
  • 来自: 南京
文章分类
社区版块
存档分类
最新评论

修改xp和win7 用户配置文件目录(的USERPROFILE路径)

 
阅读更多

发现一篇不错的文章,转过来大家看看
修改XP的用户配置文件目录(USERPROFILE)
XP缺省的用户配置文件目录是C:/Documents And Settings/<user>,下面一般放特定用户的各种配置文件,比如Internet临时文件,cookie文件,等等。
但是由于C盘一般不大,所以当此文件夹大小增长时,就会耗尽C盘空间;没办法,只好寻找一种可以挪动该文件夹得方法,按如下步骤可以做。
修改注册表的ProfileImagePath值
首先必须找到该用户的SID,进入下列键值:
HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT/CurrentVersion/ProfileList/
一般而言,SID像以下形式:
S-1-5-21-1904620462-2100430276-3594733784-1009
找到和该用户match的SID,修改该SID下的ProfileImagePath为新的USERPROFILE路径
修改USER SHELL FOLDERS和SHELL FOLDERS
HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Explorer/User Shell Folders
HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Explorer/Shell Folders
你会发现在上述两项key下面,有各种键,比如Local Settings,APP Data之类的,修改这些键的值指向新的USERPROFILE
重新以该用户登入即可。
运行Set|grep USERPROFILE验证USERPROFILE确实被修改了

win7的修改方法

http://www.windows7home.net/how-to-move-user-data-folder-to-non-system-partition-in-windows-7vista/

As you know,windows 7/vista put all system data and user data on the same partition,normally it’s drive C.Under this condition we must backup our user data every time we re-install our windows 7/vista.From windows vista ,Microsoft supply us a tool mklink which can create a symbolic link under windows 7 or vista just as the command ln under unix/linux.Below is an example about how to put user data on non-system using mklink in windows 7.
1.Enable administrator account and set a password for it.You can refer How to enable or disable administrator account in windows 7

2.Logoff and login with administrator account

3.Relocate your user data to other non-system partion,for example from C:/users/J to D:/users/J

4.Use mklink to create a symbolic link from C:/users/J to D:/users/J

mklink /D C:/Users/J D:/users/J

5.Re-login use your own account,you will find nothing changed,but in fact your physical user data is on drive D.

6.Done.The next time you re-install your OS ,just use the same user name, remove C:/users/J then run the command of step 3 again then your user data is back.

win7的更加简单的方法:右键拖拽法(释放后选择“移动….”) 这个方法我已经验证过了,觉得最方便。建议在装完操作系统和建立用户后立即这样操作,以免有些程序没有按照规范编程而造成先前安装的程序无法使用了。xp是否也适合用这个方法,我就不知道了。

http://blogs.zdnet.com/Bott/?p=215

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics