史萊姆論壇

史萊姆論壇 (http://forum.slime.com.tw/)
-   作業系統操作技術文件 (http://forum.slime.com.tw/f128.html)
-   -   使用ntfs的連接點移動 document and setting (http://forum.slime.com.tw/thread119649.html)

psac 2004-08-04 09:51 PM

使用ntfs的連接點移動 document and setting
 
由於windows使用document and setting 存儲了大量內容,單純使用profile的方法不能夠移走document and setting 目錄,因為很多動態庫在註冊表中記錄了document and setting 目錄的絕對位置


2000,xp,2k3中的ntfs5多了一個新特性,就是連接點,可以像linux 下面那樣
直接mount一個分區到一個ntfs5的目錄上,也可以在ntfs5上產生一個目錄或者文件的符號連接
這裡有兩個指令可以使用,一個是 mountvol (這個指令是windows 原有的的),就是mount一個分區到一個ntfs的目錄上,而且只能mount分區,

另一個指令是linkd.exe,是windows的資源工具箱中的,可以在微軟下載
http://www.microsoft.com/downloads/d...DisplayLang=en
這個指令可以把 ntfs分區上的 document and setting 目錄 映射到另一個分區的某個目錄。

使用 mountvol 的方法:
首先執行mountvol,獲得需要mount的磁碟區名稱,如
\\?\Volume{ef2c5830-890a-11d8-9112-806e6f6e6963}\ C:\ \\?\Volume{ef2c5831-890a-11d8-9112-806e6f6e6963}\ D:\ \\?\Volume{ef2c5832-890a-11d8-9112-806e6f6e6963}\ E:\


假設系統在c碟,要把document and setting 目錄移動到D碟
然後 寫下如下的指令碼
xcopy "c:\document and setting" D:\ /S /E /H ren "c:\document and setting" "c:\document and setting .bak" md "c:\document and setting" mountvol "c:\document and setting" \\?\Volume{ef2c5831-890a-11d8-9112-806e6f6e6963}\

把如下的指令碼放到開機指令碼去執行,輸入「gpedit.msc」後Enter鍵,開啟群組原則編輯器。依次展開「電腦管理→Windows設定→指令碼(啟動/關閉)」,雙按啟動項,然後增加,
然後重新啟動,這樣 你的"c:\document and setting" 就被轉發IP到 D碟了
ps: 上面的開機指令碼 只要執行一次,沖啟動後,記住 刪除該指令碼。

使用 linkd.exe的方法:
優於mountvol的方面是: linkd 可以把"c:\document and setting" 目錄 映射到d盤的某個目錄,而不是d盤

linkd 的指令很簡單 :用下面的指令替換前面指令碼中 mountvol的部分就可以了,xcopy需要相應的修改,其他不變
linkd "c:\document and setting" d:\xxxxxxxxx


所有時間均為台北時間。現在的時間是 08:21 PM

Powered by vBulletin® 版本 3.6.8
版權所有 ©2000 - 2024, Jelsoft Enterprises Ltd.

『服務條款』

* 有問題不知道該怎麼解決嗎?請聯絡本站的系統管理員 *


SEO by vBSEO 3.6.1