PATH & Environment Repair
How PawOS repairs Windows PATH and environment variables — the real implementation.
PawOS can add a folder to the real Windows System PATH, or set any named environment variable (JAVA_HOME, ANDROID_HOME, and similar), requesting real administrator elevation when required.
PATH detection
Before writing, PawOS checks whether the target value is already present in the requested scope — an already-correct PATH is reported as such, never re-added.
PATH repair
Writes go to System (Machine) scope by default — the goal is "leave the computer correctly configured," not scoped so narrowly it only helps the current session. PawOS never silently downgrades to a User-scope write on its own.
- 1
Attempt un-elevated
Works immediately if the process already has administrator rights.
- 2
Request real elevation
If Machine-scope access is denied, PawOS requests a genuine Windows UAC prompt.
- 3
Confirm by re-reading
Because exit codes don’t reliably cross the elevation boundary, success is confirmed by re-reading the Machine-scope registry value afterward and comparing it to what was requested — never trusted from the elevated process’s own exit code.
- 4
Honest decision point
If elevation isn’t available (declined, timed out, or a non-interactive session), PawOS reports this plainly and offers the real choice: retry elevated, or settle for a User-scope write instead.
Environment changes
A PATH or environment-variable change made moments earlier is made visible to the very next verification check in the same session — PawOS re-reads Machine+User environment straight from the registry (short-cached, not spawned fresh for every single check) rather than trusting its own long-running process’s stale in-memory environment, which would otherwise wrongly report "still not installed" immediately after a real fix.
Verification, retry, and failure
The same dual-shell (cmd.exe + PowerShell) version check used for software installation verifies a PATH fix. Failure and retry follow the same rules described on the Software Installation page.
Desktop source includes PATH/environment inspection and repair paths. The behavior described here was not independently re-run as part of this documentation update; do not treat source presence as a successful repair test.
How it works
What you see
- Your task progress, plan review with affected files and proposed changes, permission questions, command output, diffs, test results, previews and the final Work Record.
- For multi-file work you see the plan, why each step is needed, and Approve, Reject and Revise controls.
- While work runs you can follow terminal output, running processes, build and test results, and preview screenshots.
What PawOS does
- PawOS reads your project structure, dependencies and related files before proposing changes.
- Edits are applied precisely against the current file contents.
- Checks can include syntax, imports, type checking, linting, builds, tests, running-app health and visual checks, depending on your project.
Permissions
- Approving a plan records your intent; each edit, overwrite, command, git change, install, system change, connection or deploy still asks for approval.
- Commands run under clear rules — PawOS is not an unrestricted shell.
- Diffs you see come from the real changes, never an illustration.
Records
- Finished coding work shows the files changed, commands run, their results and output, test results, and screenshots when the change is visual.
- If a check was skipped (for example, the project has no test script), the Work Record says so.
- A rejected plan makes no changes.
Good to know
- Deep project analysis is strongest for TypeScript and JavaScript; every language can be edited.