A lightweight Windows utility that manages User and System PATH environment variables directly from Windows Explorer's right-click context menu.
Features
- 🖱️ Right-click integration — Add or remove folders from PATH directly in Explorer
- 👤 User & System PATH — Manage both scopes with automatic UAC elevation
- 🔔 Toast notifications — Silent operation with clean Windows notifications
- ⚡ Zero dependencies — Pure C, Win32 API only, ~45 KB executable
- 🛡️ Safe — Duplicate detection, path normalization, preserves
REG_EXPAND_SZ
Installation
- Download
pathr.exefrom Releases - Double-click
pathr.exe— it will set itself up automatically - Accept the UAC prompt (required to register the context menu)
- Done! Right-click any folder to see the Pathr menu
Context Menu
After installation, right-click any folder (or the background of a folder) in Explorer:
Pathr
├── Add to Path
│ ├── User
│ └── System 🛡️
└── Remove from Path
├── User
└── System 🛡️
CLI Usage
pathr # First run: install | After: show status pathr --install # Register context menu pathr --uninstall # Remove context menu pathr --add-user "C:\tools" # Add to User PATH pathr --add-system "C:\tools" # Add to System PATH (auto-elevates) pathr --remove-user "C:\tools" # Remove from User PATH pathr --remove-system "C:\tools" # Remove from System PATH (auto-elevates)
Exit Codes
| Code | Meaning |
|---|---|
0 |
Success |
1 |
Invalid argument |
2 |
Registry error |
3 |
Already exists / Not found |
Uninstall
Then delete the executable.
Building from Source
Requirements: MSYS2 with MinGW-w64 GCC