wtgutil (Windows To Go Utility) is a command-line tool that helps you manage and optimize your Windows To Go (WTG) workstation. It allows you to toggle WTG-specific registry settings, control local disk visibility, and manage the UASP (USB Attached SCSI Protocol) behavior of your WTG drive — all without manual registry editing.
Windows To Go allows you to run Windows from a USB drive, but Microsoft has imposed numerous restrictions on this feature. For example, Microsoft has removed the WinToGo creation tool from the Enterprise edition, WinToGo systems cannot be upgraded across versions using standard methods, and you cannot easily convert the Windows installation on your laptop or desktop into a WinToGo system.
This tool automates these modifications—originally created to simplify WinToGo upgrades, it has evolved into a utility for general WinToGo system management.
- View current settings — Inspect all WTG-related registry values at a glance
- Toggle WTG mode — Switch between Windows To Go mode and standard desktop mode
- Hide/show local disks — Prevent the WTG system from mounting internal drives to avoid accidental modifications
- Manage UASP — Enable or disable USB Attached SCSI Protocol on the WTG drive (disabling UASP improves stability on unexpected disconnection)
- Install/uninstall — Install to your system for global access, or cleanly remove it
- Debug mode — Enable verbose debug output via
--debugflag to inspect registry and WMI operations - Multi-language support — Switch display language via
--langflag (English and Simplified Chinese)
- OS: Windows 10 or newer
- Architecture: x86, amd64
- Runtime: .NET Framework 4.7.2 or newer
- Privileges: Administrator rights (required for registry modifications)
You can run wtgutil directly without installation — just download and go:
-
Download the latest binary from the Releases page.
-
Rename the downloaded file to
wtgutil.exe. -
Run it directly from the download location:
.\wtgutil help
Tip
For convenience, run wtgutil install as Administrator to install it into your system, following operations will be carried out:
- Copies
wtgutil.exeto%ProgramFiles%\wtgutil\ - Creates a
wtgualias (hard link) so you can usewtguin place ofwtgutil - Adds the install directory to the system
PATH - Adds
HKLM/Software/wtgutil/InstallFlagkey
After one-time installation, you can use wtgutil or wtgu from anywhere.
If you want to remove wtgutil, simply run wtgutil uninstall
Run Windows Terminal, PowerShell, or Command Prompt as Administrator, then type:
wtgutil <command> [arguments]The program will exit immediately if not run with administrator privileges.
To get started quickly:
wtgutil helpInstall wtgutil into your system for global access.
wtgutil installWhat it does:
- Copies
wtgutil.exeto%ProgramFiles%\wtgutil\ - Creates a
wtguhard link alias (wtguworks the same aswtgutil) - Adds the install directory to the system
PATH - Sets an install flag in
HKLM\Software\wtgutil
After installation, the original executable is deleted automatically. You can then use wtgutil or wtgu from any terminal.
Tip
A terminal restart may be required for the PATH change to take effect.
Remove wtgutil from your system.
wtgutil uninstallWhat it does:
- Deletes
wtgutil.exeand thewtgualias from%ProgramFiles%\wtgutil\ - Removes the install directory from the system
PATH - Cleans up the
HKLM\Software\wtgutilregistry key
If
wtgutilis running from the installed location, the executable is scheduled for deletion after the process exits.
Tip
Need it again? Re-download from the Releases page and run wtgutil install.
Warning
uninstall will refuse to run unless wtgutil was installed via wtgutil install. This prevents accidental file deletion.
Display all current WTG-related system settings, including:
- USB boot status (
BootDriverFlags) - Windows To Go flag (
PortableOperatingSystem) - Local disk visibility (
SanPolicy) - UASP status for the WTG drive
wtgutil infoSwitch the system between Windows To Go mode and default desktop mode.
| Subcommand | Effect |
|---|---|
wintogo |
Enable Windows To Go mode — sets BootDriverFlags=20, PortableOperatingSystem=1, SanPolicy=4 |
default |
Restore standard desktop settings — sets BootDriverFlags=0, PortableOperatingSystem=0, SanPolicy=1 |
wtgutil mode wintogo
wtgutil mode defaultWarning
Switching to default mode will disable USB boot support. Do not restart your WTG system after applying this setting, or it may fail to boot from the USB drive.
Control whether local (internal) disks are visible to the WTG system.
| Subcommand | Effect |
|---|---|
show |
Local disks are visible at startup (SanPolicy=1) |
hide |
Local disks are hidden at startup (SanPolicy=4) — prevents accidental writes to internal drives |
wtgutil partmgr show
wtgutil partmgr hideA system restart is required for changes to take effect.
Enable or disable UASP (USB Attached SCSI Protocol) on the WTG drive.
| Subcommand | Effect |
|---|---|
off |
Disable UASP — forces the USB mass storage driver (USBSTOR), which reduces data corruption risk when the drive is unexpectedly unplugged |
on |
(Experimental) Re-enable UASP — uses the native UASPStor driver for better performance |
wtgutil uasp off
wtgutil uasp onNote
The uasp command requires a WTG drive to be detected. If no WTG drive is found, the command will report an error.
wtgutil help # Show usage information and all available commands
wtgutil about # Display version and license informationThese options can be placed before any command:
| Option | Description |
|---|---|
--help |
Show help information |
--version |
Display the version number |
--debug |
Enable verbose debug output (registry operations, WMI queries, command routing) |
--lang <code> |
Override display language. Supported codes: en (English), zh-CN (Simplified Chinese) |
wtgutil --lang zh-CN info
wtgutil --debug help
wtgutil --versionwtgutil operates by modifying specific registry keys that control Windows To Go behavior. Below is the complete reference of affected registry entries.
| Registry Key | Registry Path | Type | Value | Description | Value Description |
|---|---|---|---|---|---|
BootDriverFlags |
HKLM\SYSTEM\HardwareConfig\Current |
REG_DWORD |
20or0 |
Controls whether the system allows booting from USB devices. | 0 - System defaults20 - Allow booting from USB devices |
PortableOperatingSystem |
HKLM\SYSTEM\CurrentControlSet\Control |
REG_DWORD |
0or1 |
Tells Windows it is running from a portable installation and enables Windows To Go features. | 0 - Disabled1 - Enable |
SanPolicy |
HKLM\SYSTEM\CurrentControlSet\Services\partmgr\Parameters |
REG_DWORD |
1or4 |
Controls whether the partition manager exposes local/internal disks. | 1 - Show local disks4 - Hide local disks |
CapabilitiesDeviceDescMfgService |
HKLM\SYSTEM\CurrentControlSet\Enum\<deviceInstancePath> |
N/A | N/A | Disabling UASP modifies the device's registry entries under HKLM\SYSTEM\CurrentControlSet\Enum\<DeviceInstancePath> to use the USBSTOR driver instead of UASPStor. This improves resilience to sudden disconnection at the cost of peak I/O performance. |
N/A |
Q: Why does the tool require administrator privileges?
Because it reads and writes to HKLM (local machine) registry hives, which requires elevated access.
Q: What happens if I disable UASP?
The WTG drive switches from the UASP driver to the generic USB mass storage driver. This slightly reduces performance but eliminates the risk of filesystem corruption when the drive is unplugged without being safely removed first.
Q: Can I undo all changes?
Yes. Run wtgutil mode default and/or wtgutil uasp on to revert the settings, then restart your system.
Q: How do I know my current settings?
Run wtgutil info to display all current WTG-related values.
Q: Is the WTG drive auto-detected?
Yes. The tool uses WMI to query Win32_SCSIController and finds the USB controller associated with the WTG drive.
Q: How can I see what the tool is doing under the hood?
Use the --debug flag before any command to enable verbose output. It shows every registry read/write, WMI query, and command routing step — useful for troubleshooting or understanding the tool's behavior.
wtgutil --debug infoContributions are welcome! Feel free to:
- Open an issue for bug reports or feature requests
- Submit a Pull Request with improvements
This project is licensed under the GNU General Public License v3.0.