Repository navigation
[Enhancement]: Customization — Environment Variable Editor (PATH management GUI) #331
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Activity
- added a commit that references this issue
on May 22, 2026 - added 2 commits that reference this issue
on Jun 24, 2026 Shipped in v1.22.0.
The Customization group's Environment Variables tab is now fully implemented — a proper GUI for editing User and System variables, with the dedicated PATH editor this issue asked for.
What it does
- Lists User and System variables in one grid; filter by scope and search by name or value.
- Edit values in place, and add or remove variables.
- Dedicated PATH editor for PATH-like variables: reorder directories (up/down), remove entries, and strip duplicates in one click.
- Missing folders are highlighted so dead PATH entries are obvious at a glance.
- Validation before apply: variable names are checked at the trust boundary (no
=, no whitespace, no leading digit, no shell metacharacters). - Backup/restore: a one-time JSON snapshot of every variable is written before the first change, so the original environment is recoverable.
How it's built
EnvironmentVariableServicereads/writes both scopes viaEnvironment.SetEnvironmentVariable, which broadcastsWM_SETTINGCHANGEso new terminals pick up changes without a reboot. It mirrors the existingHostsFileServicebackup contract andPrivacyService's elevation-aware writes (a denied System-scope write returns gracefully instead of throwing). PATH split/join/dedupe are pure, unit-tested helpers.EnvironmentVariablesViewModelfollows the existing staged-edit pattern (baseline + pending-change count, Apply/Discard,DialogServiceconfirmation, admin elevation banner). System-scope edits require administrator; User-scope edits don't.EnvironmentVariablesViewreuses the standard tab layout, styles, and accessibility conventions.
Verification
- 20 unit tests: name validation (accept/reject, including injection-ish and overlong inputs), PATH split/join round-trips, deduplication (case-insensitive, trailing-slash aware), and backup create/no-overwrite/corrupt/missing handling.
Install:
winget upgrade laurentiu021.SysManageror grab the portable.exefrom the v1.22.0 release.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Problem
Editing PATH and environment variables in Windows is painful: a single long textbox, no validation, easy to break things.
Proposed solution
Affected tab
Customization (new group)