摘要:
修改windows server 2008默认设定,使得Profile默认路径从C:\用户(C:\Users)重定向到其他盘如D:\用户。要求
目标盘格式为NTFS。
操作步骤:(
建议服务器在加入域之前操作)
1.保存配置文件(.xml到D盘)
配置文件内容如下
蓝色字体
显示部分,另存为D:\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>
<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>
2.调用sysprep
cd c:\windows\system32\sysprep
sysprep.exe /audit /reboot /unattend:D:\folders.xml
弹出sysprep窗口,保持默认点击“确定“按钮重启
3.检查
C:\用户已经迁移到
D:\用户
<完成>
转载于:https://blog.51cto.com/vtech/1123830