본문 바로가기
정보기술/일반

Windows 7 사용자 디렉토리 옮기기

by fermi 2009. 11. 29.
mklink 를 사용하여 Directory Junction을 만드는 것이 가장 적합함. Symbolic Link를 만들어도 되나, Static하게 사용자 디렉토리를 통채로 대체할 경우에는 Junction이 적합한 것으로 보임 (아래 2번의 경우)
그러나 다른 계정으로 로그인한 흔적을 만들지 않으려면 3번 방법과 같이, Win 7 USB 부팅을 통해서 명령 프롬프트를 띄우고 (Shift-F10) 작업하는 것이 좋다 (아래 3 참조)

OS 설치단계에서 Junction을 만들지 않고, 사용중에 복사를 한 후 Junction을 만들면, 사용권한 정보가 동일하게 넘어가지 않으므로, 사용권한까지 동일하게 만들려면 복사후 사용권한을 수정해야 한다.

1. NTFS Directory Symbolic Link 사용:
http://rahulsarin.com/technology/moving-a-users-filesdirectory-in-windows-7-368/

2. NTFS Directory Junction 사용:
http://www.starkeith.net/coredump/2009/05/18/how-to-move-your-windows-user-profile-to-another-drive/

3. Windows 7 OS 설치단계에서 변경:
http://forums.whirlpool.net.au/forum-replies-archive.cfm/1309345.html

Moving User Profiles:
During Windows 7 install, you will be prompted to enter your user name. At this point, DO NOT ENTER anything yet. Bring up a command prompt (Shift – F10).

In the command prompt, copy the user directory from your OS HDD (C: I assume) to your storage drive (D: I assume). Then delete the original directory.

robocopy "C:\Users" "D:\Users" /E /COPYALL /XJ
rmdir "C:\users" /S /Q

Then make a symbolic link.

mklink /J "C:\Users" "D:\Users"


(참고) NTFS Junction, Hard Link, Symbolic Link 차이:
http://www.mydigitallife.info/2007/05/22/create-symbolic-links-hard-links-and-directory-junctions-in-vista-with-mklink/
http://msdn.microsoft.com/en-us/library/aa365006%28VS.85%29.aspx