Skip to content
Nothing9495Public

About

wtgutil helps you adjust your WinToGo workstation settings more easily

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Latest commit

 

History

79 Commits

Folders and files

Repository files navigation

wtgutil

standard-readme compliant License: GPLv3

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.

Contents

Background

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.

Features

  • 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 --debug flag to inspect registry and WMI operations
  • Multi-language support — Switch display language via --lang flag (English and Simplified Chinese)

Install & Usage

System Requirements

  • OS: Windows 10 or newer
  • Architecture: x86, amd64
  • Runtime: .NET Framework 4.7.2 or newer
  • Privileges: Administrator rights (required for registry modifications)

Install

You can run wtgutil directly without installation — just download and go:

  1. Download the latest binary from the Releases page.

  2. Rename the downloaded file to wtgutil.exe.

  3. 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.exe to %ProgramFiles%\wtgutil\
  • Creates a wtgu alias (hard link) so you can use wtgu in place of wtgutil
  • Adds the install directory to the system PATH
  • Adds HKLM/Software/wtgutil/InstallFlag key

After one-time installation, you can use wtgutil or wtgu from anywhere. If you want to remove wtgutil, simply run wtgutil uninstall

Usage

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 help

Commands

install

Install wtgutil into your system for global access.

wtgutil install

What it does:

  • Copies wtgutil.exe to %ProgramFiles%\wtgutil\
  • Creates a wtgu hard link alias (wtgu works the same as wtgutil)
  • 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.

uninstall

Remove wtgutil from your system.

wtgutil uninstall

What it does:

  • Deletes wtgutil.exe and the wtgu alias from %ProgramFiles%\wtgutil\
  • Removes the install directory from the system PATH
  • Cleans up the HKLM\Software\wtgutil registry key

If wtgutil is 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.

info

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 info

mode

Switch 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 default

Warning

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.

partmgr

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 hide

A system restart is required for changes to take effect.

uasp

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 on

Note

The uasp command requires a WTG drive to be detected. If no WTG drive is found, the command will report an error.

help & about

wtgutil help       # Show usage information and all available commands
wtgutil about      # Display version and license information

Global Options

These 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 --version

How It Works

wtgutil 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 defaults
20 - 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 - Disabled
1 - Enable
SanPolicy HKLM\SYSTEM\CurrentControlSet\Services\partmgr\Parameters REG_DWORD 1or4 Controls whether the partition manager exposes local/internal disks. 1 - Show local disks
4 - Hide local disks
Capabilities
DeviceDesc
Mfg
Service
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&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 info

Contributing

Contributions are welcome! Feel free to:

  • Open an issue for bug reports or feature requests
  • Submit a Pull Request with improvements

License

This project is licensed under the GNU General Public License v3.0.

About

wtgutil helps you adjust your WinToGo workstation settings more easily

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages