How to Move Users Folder to another Location in Windows 10

Windows10において、ユーザプロファイルフォルダーのドライブを別の場所に移動設定する方法について

SSDの容量あたりの単価も安くなってきたのでそれほどニーズはないかもしれないが、ユーザプロファイルの容量は巨大になりやすく大容量のHDDドライブに配置しておきたいということもあるだろう。
ここでは、Windows10のマイナーバージョンアップなどのパッチにトラブルになることなく、ユーザプロファイルの配置ドライブをCドライブ以外の場所にデフォルト設定する方法を解説しておく。

1.手順1:notepadなどのエディタを使って、以下の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>
</FolderLocations>
</component>
</settings>
</unattend>

Change the following details if needed (see the parts in red in above code):
必要に応じて以下の項目は変更編集すること。

  • Line 4: The value of variable ProcessorArchitecture must be amd64 if you are installing a 64 bit Windows regardless of if you have an Intel or AMD processor, and x86 if you are installing a 32 bit Windows
    4行目:プロセッサーアーキテクチャについて、64ビットの場合は、「amd64」、32ビットの場合は「x86」と記述すること。
  • Line 6: The value in ProfilesDirectory tags is the new location for the Users folder, in this example answer file it will be moved to D:\Users.Be sure that the drive into which you are relocating the Users folder is empty or at least does not contain any Windows system folders, especially Users folder or parts of it from any current or previous Windows installation.”[/
    6行目:ユーザプロファイルディレクトリの場所をしていする。この例では、DドライブのUsersフォルダを指定している。「D:\Users」

Save the file as an XML file to root of any drive except C:. In this example I have already renamed my D: drive to User Profiles and save the answer file there as D:\relocate.xml:
以上の作業が終わったら、Cドライブ以外の適当な場所に、例えば、「D:\relocate.xml」として保存する。

2.手順2:Sysprepを使って変更設定を適用する。

Almost there! Open elevated Command Prompt (tutorial). To ensure that WMP Network Sharing Service is stopped, give the following command:
管理者用コマンドプロンプトを立ち上げ、以下のコマンドにて、WMP Network Sharing Service を確実に停止させること。

net stop wmpnetworksvc

The service is most probably not running but if it is, it will now be stopped. When this service is running, Sysprep fails.

Now the Sysprep command itself. Type the following:
次に、以下のようにsysprepコマンドを実行する。
%windir%は、通常、C:\Winodwsとなる。

%windir%\system32\sysprep\sysprep.exe /oobe /reboot /unattend:d:\relocate.xml

Accessibility Toolbar