Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-usbdisable

A lightweight Python tool for enabling and disabling USB devices on Windows.

How to use

  1. Download ws_usbdisable.exe from the latest release.
  2. Run the executable. Windows will ask for administrator privileges; accept the UAC prompt.
  3. The tool checks the current USB mass-storage status and toggles it:
    • If USB storage is enabled, it will be disabled.
    • If USB storage is disabled, it will be enabled.
  4. Choose whether to restart Windows immediately. A restart is required for the change to take effect.

Note

This tool only affects USB mass-storage devices such as flash drives and external hard drives. USB keyboards and mice are not disabled.

Requirements and build

Building the executable requires Python and PyInstaller:

python -m pip install --upgrade pip
python -m pip install pyinstaller
pyinstaller --onefile --console --name ws_usbdisable ws_usbdisable.py

About

A lightweight Python tool for enabling and disabling USB devices on Windows.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages