2009年11月29日 星期日

How to move "Documents and Settings" folder to another drive (MFT volume or conventional hard disk)

How to move "Documents and Settings" folder to another drive
(MFT volume or conventional hard disk)


In "Documents and Settings" folder, there exist user profiles and its sub-folders containing many temporary files used by several programs.

* Temporay Internet files of several Web browsers - MS Internet Explorer, FireFox, Google Chrome, Opera, Apple Safari, etc.

* Google Earth cache

* OutLook 2007 data file - .pst, .ost

* User temp directory - C:\Documents and Settings\\Local Settings\Temp

* MS Search 4.0 index file - C:\Documents and Settings\All Users\Application Data\Microsoft\Search

* etc.


Easyco says they will provide a convenient tookit to move user profiles into the MFT volume by the end of this year.

http://www.easyco.com/zx128530114135...dows/index.htm


To move user profiles(in "Documents and Settings" folder), we need to logon as a different user of administrator privilege.


Microsoft KB314843

An error message informs you that you cannot move or rename the Documents and Settings folder

http://support.microsoft.com/kb/314843/en-us


I had moved all of the "Documents and Settings" folder to MFT volume by means of backup and restore(Acronis True Image), all the user profiles in one time.



How to move "Documents and Settings" folder to another drive(MFT volume or conventional hard disk).

Windows XP



0. Download "junction.zip" and unzip the file.

( http://technet.microsoft.com/en-us/s.../bb896768.aspx )

Copy "junction.exe" to Windows\system32 directory.


1. Backup your entire system drive(C.

We need a backup copy of "Documents and Settings" folder only, but backing up entire drive is recommended against serious problem.

Important : If "Documents and Settings" folder is not present, Windows does not boot.


2. Restore "Documents and Settings" folder to another drive(MFT volume or conventional hard disk, say M: drive) from backup image.


3. Verify "Documents and Settings" folder at the root directory of M: drive.

M:\Document and Settings ----> O.K.

M:\Drive C\Document and Settings ----> Move out "Document and Settings" folder to root directory.


4. Start registry editor.

Start -> Run -> regedit


5. Go to

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList


* ProfileList key

Change the value of ProfilesDirectory

%SystemDrive%\Documents and Settings

to

M:\Documents and Settings




* Subkeys

Change the value of ProfileImagePath.


If ProfileImagePath is

%systemroot%\system32\config\systemprofile

then leave as it is.(S-1-5-18)




If ProfileImagePath is

%SystemDrive%\Documents and Settings\xxxx

then change to

M:\Documents and Settings\xxxx(S-1-5-19, S-1-5-20, etc.)




6. Close Registry Editor, and restart Windows.

It's almost done.


7. But, In registry there may be hardcoded "C:\Documents and Settings\...." value made by already intalled programs and they may attempt to access "C:\Documents and Settings".

Change such situation to access "M:\Documents and Settings" instead of "C:\Documents and Settings".


* method 1(conversome )

In registry, search and replace all instances of

"%SystemDrive%\Documents and Settings" or "C:\Documents and Setting"

to

"M:\Documents and Settings".


For search and replace of registry instances, I used CreativeElement PowerTools.

http://www.creativelement.com/powertools/


* method2(more convenient than method1, recommended)

Boot Windows in safety mode.

Rename "Documents and Settings" folder of C: drive to "Documents and Settings.org"

In command prompt

C:\>junction "C:\Documents and Settings" "M:\Documents and Settings"


After setting juntion point, you can recover ProfileImagePath

M:\Documents and Settings\xxxx

to

%SystemDrive%\Documents and Settings\xxxx(or C:\Documents and Settings\xxxx)

But, it's not so good because of some side effects of junction point.

Leave "M:\Documents and Settings\xxxx" as it is after setting junction point.


* Side effect of junction point(not serious) : When removing already installed programs, some uninstallers cannot delete subdirectories of linked folder.

ex.

C:\Documents and Settings\All Users\Start Menu\Programs\Some_program_folder

If ProfileImagePaths were leaved as "M:\Documents and Settings\xxxx", user profiles could be accessed in two ways and side effect of junction point were rare.


8. Reboot Windows.


9. In rare case, if hidden and system attribute of "desktop.ini" files were lost when backing up and restoring, there may appear "desktop.ini" files on desktop and several startmenu programs folders or Notepad is opening a "desktop.ini" file.

Do not delete "desktop.ini" files and reset the attribute of "desktop.ini" files of all subdirectories hidden and system as before.

In command prompt,

M:\>attrib +h +s desktop.ini /s



In Vista, user profile directory names are changed from Windows XP.


Change User Profile Folder Location in Vista

http://joshmouch.wordpress.com/2007/...tion-in-vista/

Last edited by geosoft; 10-30-2008 at 06:14 AM.

沒有留言:

張貼留言