How lillypk/sevx_set-environment-variable-x works
SEVX is a Windows command-line tool and C++ library for reading and modifying persistent User or System PATH values in the registry; it does not modify the current process environment. The main workflow parses a command and scope, then dispatches to library operations that read, split, modify or join PATH entries, and persist changes when needed. Persistence broadcasts a Windows environment-change notification. The README also documents raw reads, multi-entry operations, prepend/deduplication, and membership checks. Wiring is based on the sampled CLI and library source.
Main entry points: sevx.cpp Write registry · sevx.hpp SEVX API · main.cpp Command dispatcher
Components 17
Command line
- Command dispatcher
src/main.cpp - Scope batches
src/main.cpp
PATH library
- SEVX API
include/sevx.hpp - Get PATH
src/sevx.cpp - Set PATH
src/sevx.cpp - Add entries
src/sevx.cpp - Remove entries
src/sevx.cpp - Check membership
src/sevx.cpp - Split PATH
src/sevx.cpp - Join PATH
src/sevx.cpp
Windows integration
- Read registry
src/sevx.cpp - Write registry
src/sevx.cpp - User environment key
- System environment key
- Environment broadcast
src/sevx.cpp
Other components
- CLI user
- Windows APIs
Connections 29
- CLI user → Command dispatcher: invokes
- Command dispatcher → Scope batches: parses arguments
- Command dispatcher → SEVX API: dispatches commands
- Scope batches → Split PATH: splits input
- SEVX API → Get PATH: exposes
- SEVX API → Set PATH: exposes
- SEVX API → Add entries: exposes
- SEVX API → Remove entries: exposes
- SEVX API → Check membership: exposes
- Get PATH → Read registry: reads PATH
- Get PATH → Split PATH: splits entries
- Set PATH → Read registry: reads old PATH
- Set PATH → Join PATH: joins entries
- Set PATH → Write registry: writes changed PATH
- Add entries → Get PATH: loads entries
- Add entries → Join PATH: joins entries
- Add entries → Write registry: writes changed PATH
- Remove entries → Get PATH: loads entries
- Remove entries → Join PATH: joins entries
- Remove entries → Write registry: writes changed PATH
- Check membership → Get PATH: loads entries
- Read registry → User environment key: reads User scope
- Read registry → System environment key: reads System scope
- Write registry → User environment key: writes User scope
- Write registry → System environment key: writes System scope
- Read registry → Windows APIs: uses registry APIs
- Write registry → Windows APIs: uses registry APIs
- Write registry → Environment broadcast: notifies after write
- Environment broadcast → Windows APIs: broadcasts setting change