HowTo:如何在SSD上安裝Windows 7/ Server 2008 並將使用者設定檔移至其他硬碟,讓SSD專注加速系統效能
現在 SSD 又小又貴,一直會長大的使用者設定檔(User Profile),如何從 C 磁碟移出至 D 磁碟?
Windows 7 / Windows Server 2008 安裝後,
請先不要增加使用者,請用 Admimistrator 做完所有的事情後再新增帳號;另外也不要安裝程式及啟用 Windows 及執行Windows Update。
D:\sysprep\ 建立一個 folders.xml,內容如下:
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<FolderLocations>
<ProfilesDirectory>d:\Users</ProfilesDirectory>
<ProgramData>d:\ProgramData</ProgramData>
</FolderLocations>
</component>
</settings>
<cpi:offlineImage cpi:source="wim:h:/sources/install.wim#Windows 7 ULTIMATE" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>
D:\sysprep\ 建立一個doSysprep.bat,內容如下:
c:\windows\system32\sysprep\sysprep.exe /oobe /generalize /reboot /unattend:D:\sysprep\folders.xml
由於 Windows 7 / Windows Server 2008 已內建 Sysprep 工具,所以不用另外再安裝。
以 Administrator 執行 doSysprep.bat 時,會重新開機後,重建 windows,會需要準備 Windows 序號及啟動。
此時就會發現 C:\Users 目錄已經不見了,會被搬至 D:\Users,再來就是隱藏目錄 c:\ProgramData 仍是會有,但是主要的資料都被放到了 D:\ProgramData 之中。