Problem
Run-PATH-Repair-Admin.bat builds the elevated PowerShell command as a formatted string:
PowerShell -NoProfile -Command "$scriptPath = $args[0]; $arguments = '-NoProfile -NoExit -File \"{0}\"' -f $scriptPath; Start-Process -FilePath 'PowerShell.exe' -Verb RunAs -ArgumentList $arguments" "%repair_script%"
Paths containing apostrophes or ampersands break this quoting and either fail or run a mangled command. (Also tracked in BACKLOG.md P3.)
Proposed fix
Replace the string-built command with an argument-array approach, e.g. pass the script path through $args all the way and use Start-Process -ArgumentList @('-NoProfile','-NoExit','-File', $scriptPath) so PowerShell handles quoting. Verify with repo paths containing spaces, apostrophes, and ampersands. Keep the launcher preview-only and preserve the visible UAC prompt.
Problem
Run-PATH-Repair-Admin.batbuilds the elevated PowerShell command as a formatted string:Paths containing apostrophes or ampersands break this quoting and either fail or run a mangled command. (Also tracked in BACKLOG.md P3.)
Proposed fix
Replace the string-built command with an argument-array approach, e.g. pass the script path through
$argsall the way and useStart-Process -ArgumentList @('-NoProfile','-NoExit','-File', $scriptPath)so PowerShell handles quoting. Verify with repo paths containing spaces, apostrophes, and ampersands. Keep the launcher preview-only and preserve the visible UAC prompt.