Skip to content

Instantly share code, notes, and snippets.

@macrotea
Created May 21, 2014 07:53
Show Gist options
  • Save macrotea/2f15b5da91ad744fc734 to your computer and use it in GitHub Desktop.
Save macrotea/2f15b5da91ad744fc734 to your computer and use it in GitHub Desktop.
基于bat命令添加环境变量
@echo off
set /p binPath=input your new bin path:
echo.
echo The original path value :
echo.
echo %path%
echo.
echo The new path value :
echo.
setx path "%binPath%;%path%" -m
echo %path%
echo. &pause
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment