A Python-based GUI tool for enabling and disabling write protection on Windows devices and external removable devices. An executable (.exe) version of the tool is also provided for ease of use, so users without Python installed can run the application directly.
- Device List: Displays all available devices (internal and external drives) for selection.
- Enable Write Protection: Protect selected devices from being modified by enabling write protection.
- Disable Write Protection: Remove write protection from selected devices.
- Log System: Tracks actions performed within the tool with detailed timestamps.
- Export Logs: Allows exporting logs for documentation and auditing purposes.
- Modern GUI: Built using ttkbootstrap for a clean and professional look.
-
Operating System: Windows 10/11 (Admin privileges required).
-
Python Version: Python 3.7 or higher.
-
Dependencies:
ttkbootstrappsutil
-
Install dependencies:
pip install ttkbootstrap psutil
- Operating System: Windows 10/11 (Admin privileges required).
- No Python Required: Simply double-click the
.exefile to run the application.
- Navigate to the folder containing
Windows_Write_Blocker.exe. - Right-click on the
.exefile and choose Run as Administrator (required for device modification). - Follow the on-screen instructions to enable/disable write protection and view logs.
- Ensure Python is installed on your system.
- Clone the repository or download the
Windows WriteBlocker.pyfile. - Install the required dependencies (see above).
- Run the script with Python:
python Windows WriteBlocker.py
The application lists all storage devices connected to the system.
- For removable devices: Write protection is managed via the Windows registry.
- For internal drives: Write protection is applied using diskpart commands.
All actions (e.g., enabling/disabling write protection) are logged with timestamps in the application interface.
Users can export the logs to a .txt file for auditing or documentation purposes.
- Windows_Write_Blocker/
- │
- ├── Windows_Write_Blocker.py # Main Python script
- ├── Windows_Write_Blocker.exe # Standalone executable version
- ├── Windows_Write_Blocker.ico # Icon file (optional)
- └── README.md # Project documentation
- Admin Privileges: Both the script and
.exerequire administrator privileges to function properly. - Diskpart Script: The tool uses temporary diskpart scripts for enabling/disabling write protection on internal drives.
- Removable Device Write Protection: Registry changes may require a restart to take effect in some cases.
- Executable Build: The
.exefile was created using pyinstaller or a similar tool, ensuring compatibility with systems without Python installed. - External Device: You may need to remove or plug in the device again after using the write protection feature.
- Diskpart Execution: Ensure diskpart is accessible from the command line.
- Removable Device Write Protection: Registry changes may require a restart to take effect in some cases.
This project is licensed under the MIT License. Feel free to modify and use it as needed.