diff --git a/workers/pa.ps1 b/workers/pa.ps1 index 106c217..4652c7c 100644 --- a/workers/pa.ps1 +++ b/workers/pa.ps1 @@ -1,4 +1,4 @@ -$newPath = $args[0] +$newPath = $args[0] -replace '"','' echo $newPath $oldPath = [Environment]::GetEnvironmentVariable('path', 'user'); [Environment]::SetEnvironmentVariable('path', "$($newPath);$($oldPath)",'user'); \ No newline at end of file diff --git a/workers/path_append.bat b/workers/path_append.bat index 015e844..5dcffb8 100644 --- a/workers/path_append.bat +++ b/workers/path_append.bat @@ -1,7 +1,8 @@ @echo off -if "%1" == "help" ( +if %1 == help ( echo:Usage: %0 path echo:path Path to be added to the user PATH variable ) else ( - %windir%\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File %~dp0pa.ps1 %1 + REM echo %~dp0pa.ps1 + %windir%\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File %~dp0_pa.ps1 \"%1\" ) \ No newline at end of file