Just a little ready-to-use packing of the Powershell version . Save this as a .cmd
or .bat
, UTF-8 or ASCII text file . Remember to restart programs that were running during the change .
@echo offset br=^rem br;pushd "%~dp0" &rem Working/{temp files} Directory . pat>->paf ;setlocal enableExtensions enableDelayedExpansionrem # Required :rem Windows Powershell v1.0 by Microsoft .rem # ;echo Make sure to run this as Administrator .!br!pauseecho(set v=set /p v=Enter the items to add . Separate by, and end the list with ";" . Do not use quotes .!br!!br!& rem #optionalrem set v=C:\Windows\WinSxS;!v! &rem MSBuild ; #optional"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -ExecutionPolicy Bypass -Command "[Environment]::SetEnvironmentVariable('Path',\"%v%$([Environment]::GetEnvironmentVariable('Path','Machine'))\",'Machine');" &rem Windows Powershell by Microsoft ;:sc_nrem endlocalrem popdpauserem exit /b