Skip to content

w3Abhishek/pathr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pathr

A lightweight Windows utility that manages User and System PATH environment variables directly from Windows Explorer's right-click context menu.

Windows C License GitHub Downloads (specific asset, latest release)

image

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

  1. Download pathr.exe from Releases
  2. Double-click pathr.exe — it will set itself up automatically
  3. Accept the UAC prompt (required to register the context menu)
  4. 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

.\pathr.exe --uninstall

Then delete the executable.

Building from Source

Requirements: MSYS2 with MinGW-w64 GCC

build.bat

License

MIT

About

A tiny Windows utility written in pure C that lets you add the current folder to your PATH directly from File Explorer.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors