Page contents -


Clone Windows To Go to a new device

This section covers cloning an operating system installed in Walkthrough 1 to a new device. Steps -


1] Devices/paths

Paths used in this section (based on mount points specified when DiskPart was used to prepare the disk - see here and here) -


2] Backup registry

The Windows To Go system registry hive (S:\Windows\system32\config\system) will be edited in step 3. Create a backup before editing the offline registry - this will be restored in step 5.

Use the copy command to create a backup of the Windows To Go system registry hive (S:\Windows\system32\config\system)


3] Edit MountedDevices and PageFile

Edits to MountedDevices and Pagefile have been included in the same section as they involve mounting and editing the Windows To Go offline registry.

Drive mount points are stored in the MountedDevices registry key. Deleting the settings in this key will ensure that mount points are issued for the new device and all references to the previous device will be removed.

If a PageFile is configured in Windows To Go then there may be issues if cloning or copying Windows To Go to a new device - due to the PageFile generally running from a fixed path that may be tied to a hardware device no longer accessible.

Mount the offline registry hive S:\Windows\system32\config\system as HKLM\_TEMP (adjust path as required)

Edit the offline registry hive mounted in the previous step and delete all entries in the MountedDevices registry key (adjust path as required)

Edit the offline registry hive and delete existing PageFile paths/settings (adjust path as required)

Unmount the registry hive mounted as HKLM\_TEMP


4] Capture as .wim

For information about the DISM /Capture-Image command syntax, enter the following in a command prompt

Capture the contents of the source drive (S:\) as F:\win2go.wim - adjust paths as required.

wimlib can be used as an alternative to DISM. Syntax -

If using wimlib, capture the contents of source drive (S:\) as F:\win2go.wim - adjust paths as required.


5] Restore registry

Restore the Windows To Go system registry hive backed up in step 2 (S:\Windows\system32\config\system.bak). This will restore registry settings in the Windows To Go installation used for cloning.

Use the delete command to delete the Windows To Go system registry hive (S:\Windows\system32\config\system)

Use the copy command to restore the backup (S:\Windows\system32\config\system.bak)


6] Apply .wim

For information about the DISM /Apply-Image command syntax, enter the following in a command prompt

Extract the contents of image 1 in F:\win2go.wim to the target drive (F:\) - adjust paths and image number as required.

wimlib can be used as an alternative to DISM. Syntax -

If using wimlib, extract the contents of image 1 in F:\win2go.wim to the target drive (F:\) - adjust paths as required.


7] Create boot files (bcdboot)

"BCDBOOT command line tool is used to copy critical boot files to the system partition and to create a new system BCD store" (https://winteltools.com/bcdboot/).

For more information about the bcdboot command syntax, enter the following in a command prompt (see here for output from Windows 10 version 21H2 bcdboot)

Create BIOS and UEFI boot files on the target drive (E:\), using the templates embedded in the operating system files extracted to drive F:\ in the preceding step - adjust paths as required.


8] bootmenupolicy / Edit boot menu entry

The bcdedit tool is used to edit entries in the Boot Configuration Database (the BCD store). Whilst bcdedit is beyond the scope of this guide, a brief overview of bcdedit and BCD paths may be helpful -

Setting the bootmenupolicy to legacy will display a basic boot menu, with improved boot speeds. More detailed information about bootmenupolicy is available here.

Edit bootmenupolicy in the BIOS boot menu (adjust paths as required)

Edit bootmenupolicy in the UEFI boot menu (adjust paths as required)

Edit the BIOS boot menu and change the name (description) of the menu entry (adjust paths/description as required)

Edit the UEFI boot menu and change the name (description) of the menu entry (adjust paths/description as required)


Copy Windows To Go .vhd to a new device

This section covers copying an operating system installed to a .vhd file in Walkthrough 2 to a new device. Steps -


1] Devices/paths

Paths used in this section (based on mount points specified when DiskPart was used to prepare the disk - see here and here) -


2] Copy .vhd

Copy S:\win2go.vhd (source .vhd) to F:\win2go.vhd (new device). Example using the copy command with /Z parameter to display progress -


3] Mount .vhd

Basic DiskPart usage is covered here.

Select the virtual hard disk copied in step 2 - adjust path as required.

Mount the virtual disk selected in the preceding step.


4] Create boot files (bcdboot)

"BCDBOOT command line tool is used to copy critical boot files to the system partition and to create a new system BCD store" (https://winteltools.com/bcdboot/).

For more information about the bcdboot command syntax, enter the following in a command prompt (see here for output from Windows 10 version 21H2 bcdboot)

Create BIOS and UEFI boot files on the target drive (E:\), using the templates embedded in the operating system files mounted as drive T:\ in the preceding step - adjust paths as required.


5] bootmenupolicy / Edit boot menu entry

The bcdedit tool is used to edit entries in the Boot Configuration Database (the BCD store). Whilst bcdedit is beyond the scope of this guide, a brief overview of bcdedit and BCD paths may be helpful -

Setting the bootmenupolicy to legacy will display a basic boot menu, with improved boot speeds. More detailed information about bootmenupolicy is available here.

Edit bootmenupolicy in the BIOS boot menu (adjust paths as required)

Edit bootmenupolicy in the UEFI boot menu (adjust paths as required)

Edit the BIOS boot menu and change the name (description) of the menu entry (adjust paths/description as required)

Edit the UEFI boot menu and change the name (description) of the menu entry (adjust paths/description as required)


6] Edit MountedDevices and PageFile

Edits to MountedDevices and Pagefile have been included in the same section as they involve mounting and editing the Windows To Go offline registry.

Drive mount points are stored in the MountedDevices registry key. Deleting the settings in this key will ensure that mount points are issued for the new device and all references to the previous device will be removed.

If a PageFile is configured in Windows To Go then there may be issues if cloning or copying Windows To Go to a new device - due to the PageFile generally running from a fixed path that may be tied to a hardware device no longer accessible.

Mount the offline registry hive T:\Windows\system32\config\system as HKLM\_TEMP (adjust path as required)

Edit the offline registry hive mounted in the previous step and delete all entries in the MountedDevices registry key (adjust path as required)

Edit the offline registry hive and delete existing PageFile paths/settings (adjust path as required)

Unmount the registry hive mounted as HKLM\_TEMP


7] Unmount .vhd

Basic DiskPart usage is covered here.

Select the mounted virtual hard disk - adjust path as required.

Unmount the virtual disk selected in the preceding step.

Document date - 6th July 2022