A lightweight Windows system tray application for instant network control
Network Kill Switch is a powerful yet simple Windows utility that gives you instant control over your network connections. With a single click from your system tray, you can disable or enable all network adapters (Ethernet and WiFi) simultaneously. Perfect for privacy, security, focus time, or quick network troubleshooting.
- System Tray Integration - Lives quietly in your Windows system tray
- One-Click Toggle - Left-click icon to instantly toggle all network adapters
- Visual Status Indicators - Green = network enabled, Red = network disabled
- Complete Network Control - Toggles both Ethernet AND WiFi adapters together
- Smart Timer Function - Temporarily disable network with auto-restore:
- 1 minute
- 2 minutes
- 5 minutes
- 30 minutes
- 1 hour
- Status Verification - Automatically verifies adapter state after toggling
- Auto-Detection - Finds your physical network adapters automatically
- Auto-Startup - Optional "Start with Windows" during installation
- Standalone Installer - No Python installation required
- ARM Compatible - Works on Windows on ARM via x64 emulation
- Lightweight - Minimal resource usage (~20-30 MB installed)
Download Latest Release (v2.0.0)
- Download
NetworkKillSwitch-Setup.exefrom the Releases page - Run the installer (requires administrator privileges)
- Follow the installation wizard:
- Choose your installation directory (default:
C:\Program Files\Network Kill Switch) - Check "Start with Windows" to enable automatic startup (recommended)
- Click Install
- Choose your installation directory (default:
- Done! The app will appear in your system tray immediately
No Python installation required! The installer includes everything you need.
- Open Windows Settings → Apps → Installed apps
- Find "Network Kill Switch"
- Click Uninstall
The uninstaller will automatically:
- Stop any running instances
- Remove the auto-startup configuration
- Clean up all files and registry entries
-
Find the icon in your system tray (notification area, bottom-right corner)
- Green icon = Network enabled (at least one adapter is active)
- Red icon = Network disabled (all adapters are off)
- Timer icon = Temporary disable mode (will auto-restore)
-
Quick Actions:
- Left-click the icon → Instantly toggle all network adapters on/off
- Right-click the icon → Open full menu with advanced options
- Toggle Network (On/Off) - Enable or disable ALL network adapters
- Disable for 1/2/5/30/60 minutes - Temporary disable with automatic restore
- Cancel Timer - Stop countdown and restore network immediately
- Quit - Exit the application
When you select a timer option:
- All network adapters are immediately disabled
- The tray icon changes to the timer icon
- Hover over the icon to see a live countdown (e.g., "Network: Disabled (Re-enabling in 4m 32s)")
- The network automatically restores when the timer expires
- You can click "Cancel Timer" or manually toggle to restore early
- Keyboard shortcuts: Not currently supported, but you can assign a hotkey to the executable via Windows properties
- Multiple adapters: The app detects and controls ALL physical Ethernet and WiFi adapters simultaneously
- Virtual adapters: VPN, Hyper-V, and other virtual adapters are excluded from control
- Administrator required: The app must run with admin privileges to control network adapters
- OS: Windows 10 or Windows 11
- Python: 3.7 or higher (for development only)
- Privileges: Administrator rights (required to toggle network adapters)
-
Clone the repository:
git clone https://github.com/chilidogsonic/network-kill-switch.git cd network-kill-switch -
Install Python dependencies:
pip install -r requirements.txt
-
Run the application:
# Open Command Prompt or PowerShell as Administrator python network_kill_switch.pyThe app will appear in your system tray.
Want to build your own installer? See BUILD.md for detailed instructions.
Quick Build:
# Install dependencies
pip install -r requirements.txt
# Build the standalone EXE and installer
build_installer.batOutput:
- Standalone EXE:
dist\NetworkKillSwitch.exe - Windows Installer:
Output\NetworkKillSwitch-Setup.exe
- Python 3.7+
- Inno Setup 6 (for creating the installer)
- PyInstaller (automatically installed by build script)
"Could not find network adapter" error
Solution:
- The app looks for physical Ethernet and WiFi adapters using specific naming patterns
- Virtual adapters (VPN, Hyper-V, VMware, VirtualBox) are intentionally excluded
- Check your adapter names in Device Manager → Network adapters
- If your adapter has an unusual name, you may need to modify the detection logic in
network_kill_switch.py(line 131)
Toggle doesn't work / No effect when clicking
Solution:
-
Verify administrator privileges:
- Press
Ctrl+Shift+Escto open Task Manager - Find
NetworkKillSwitch.exein the Details tab - Check if "Elevated" column shows "Yes"
- If not, right-click the app shortcut → "Run as administrator"
- Press
-
Check Windows Event Viewer:
- Press
Win+X→ Event Viewer - Navigate to Windows Logs → System
- Look for errors related to network adapter operations
- Press
-
Test PowerShell commands manually:
- Open PowerShell as Administrator
- Run:
Get-NetAdapter(should list your adapters) - Run:
Disable-NetAdapter -Name "Ethernet" -Confirm:$false(replace "Ethernet" with your adapter name)
Auto-startup not working
Solution:
-
Check Task Scheduler:
- Press
Win+R→ typetaskschd.msc→ Enter - Look for a task named "NetworkKillSwitchApp"
- Right-click → Properties → Verify:
- Trigger: "At log on"
- Action: Points to correct EXE path
- "Run with highest privileges" is checked
- Press
-
Run diagnostic script:
- Navigate to installation folder:
C:\Program Files\Network Kill Switch - Right-click
check_task_permissions.ps1→ "Run with PowerShell" - Review the diagnostic output
- Navigate to installation folder:
-
Manual setup:
- Right-click
setup_task_silent.ps1in the installation folder - Select "Run with PowerShell"
- Right-click
Icon doesn't appear in system tray
Solution:
-
Check if app is running:
- Open Task Manager (
Ctrl+Shift+Esc) - Look for
NetworkKillSwitch.exeunder "Background processes"
- Open Task Manager (
-
Check overflow area:
- Click the ^ arrow in your system tray (hidden icons)
- The icon might be collapsed there
-
Restart the application:
- Kill the process in Task Manager
- Relaunch from Start Menu or installation folder
App shows "Loading..." indefinitely
Solution:
- This usually indicates PowerShell commands are timing out
- Check your antivirus software isn't blocking PowerShell execution
- Try running as Administrator
- Verify PowerShell execution policy:
Get-ExecutionPolicy(should be at least RemoteSigned)
| Component | Technology | Purpose |
|---|---|---|
| Language | Python 3.7+ | Core application logic |
| UI Framework | pystray | System tray integration and menu |
| Image Processing | Pillow (PIL) | Icon rendering and manipulation |
| Network Control | Windows PowerShell | Native adapter enable/disable commands |
| Packaging | PyInstaller | Standalone EXE compilation |
| Installer | Inno Setup | Windows installer creation |
-
Adapter Detection:
- Uses PowerShell's
Get-NetAdaptercmdlet to enumerate physical network adapters - Filters for Ethernet and WiFi adapters (excludes virtual adapters like VPN, Hyper-V)
- Supports multiple adapters simultaneously
- Uses PowerShell's
-
State Management:
- Monitors adapter status using
Get-NetAdapter | Select-Object Status - Real-time status verification after each toggle operation
- Tooltip updates every second during timer countdown
- Monitors adapter status using
-
Toggle Operation:
- Executes PowerShell commands:
Enable-NetAdapter/Disable-NetAdapter - Runs in background thread to avoid UI blocking
- Visual feedback with animated loading indicator
- Executes PowerShell commands:
-
Timer Function:
- Spawns dedicated background thread for countdown
- Updates tooltip every second with formatted time remaining
- Automatically re-enables adapters when timer expires
-
Administrator Privileges:
- Embedded UAC manifest (
uac_admin=Truein PyInstaller spec) - Automatically prompts for elevation on launch
- Gracefully handles non-admin scenarios with warnings
- Embedded UAC manifest (
Network Kill Switch/
├── network_kill_switch.py # Main application code
├── NetworkKillSwitch.spec # PyInstaller build specification
├── installer.iss # Inno Setup installer script
├── build_installer.bat # Automated build script
├── icon.ico # Application icon
├── icons/ # System tray icon assets
│ ├── status_on.ico # Green (enabled state)
│ ├── status_off.ico # Red (disabled state)
│ ├── status_loading_*.ico # Loading animation frames
│ └── status_timer.ico # Timer active state
├── assets/ # Documentation assets
│ ├── logofor_readme.png # README header logo
│ └── *.png # Icon source images
├── screenshots/ # Application screenshots
├── setup_task_silent.ps1 # Auto-startup configuration
├── uninstall_task.ps1 # Auto-startup removal
├── check_task_permissions.ps1 # Diagnostic utility
├── requirements.txt # Python dependencies
├── README.md # This file
├── BUILD.md # Build instructions
├── TROUBLESHOOTING.md # Extended troubleshooting guide
├── CHANGELOG.md # Version history
└── LICENSE # MIT License
Major Update: Rebranded from "Ethernet Toggle" to "Network Kill Switch"
New Features:
- Added WiFi adapter support (in addition to Ethernet)
- Added timer function with 5 preset durations (1m, 2m, 5m, 30m, 1h)
- Live countdown display in tooltip during timer mode
- Animated loading indicator during toggle operations
- Status verification after each toggle operation
- Left-click quick toggle functionality
- Custom icon states (on, off, loading, timer)
Improvements:
- Complete rebrand to "Network Kill Switch"
- Enhanced multi-adapter support
- Better error handling and user feedback
- Optimized PowerShell execution for faster response
- ARM64 Windows compatibility via x64 emulation
Bug Fixes:
- Fixed icon path resolution in compiled EXE
- Fixed PowerShell subprocess execution in frozen executables
- Fixed admin privilege detection and warnings
- Initial release as "Ethernet Toggle"
- Basic Ethernet adapter on/off functionality
- System tray integration
- Simple green/red status indicators
For detailed change history, see CHANGELOG.md.
This project is licensed under the MIT License - see the LICENSE file for details.
TL;DR: You can use, modify, and distribute this software freely. No warranty is provided.
Contributions are welcome! Here's how you can help:
- Check if the issue already exists in Issues
- Create a new issue with:
- Clear description of the problem
- Steps to reproduce
- Expected vs actual behavior
- Your Windows version and system specs
- Open an issue with the "enhancement" label
- Describe the feature and its use case
- Explain why it would be valuable
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Make your changes with clear commit messages
- Test thoroughly on Windows 10 and 11
- Submit a pull request with a detailed description
- Follow existing code style and conventions
- Comment complex logic
- Test with both Python script and compiled EXE
- Verify admin and non-admin scenarios
- Update documentation for user-facing changes
- pystray - Excellent system tray library
- Pillow - Powerful image processing
- Windows PowerShell Team - Network adapter cmdlets
- Community Contributors - Bug reports and feature suggestions
- No internet icons created by Yudhi Restu - Flaticon
- Issues & Bugs: GitHub Issues
- Discussions: GitHub Discussions
- Latest Release: Releases Page
If you find Network Kill Switch useful, please consider:
- Starring this repository
- Reporting bugs or suggesting features
- Sharing with others who might benefit
- Providing feedback
Your support helps improve the project for everyone!
Made for the Windows community
Network Kill Switch v2.0.0 | Windows 10/11



