Skip to content

Instantly share code, notes, and snippets.

@Senorsen
Created July 5, 2016 05:45
Show Gist options
  • Save Senorsen/8dc246e56151e77dfa3dda7b97c23ad9 to your computer and use it in GitHub Desktop.
Save Senorsen/8dc246e56151e77dfa3dda7b97c23ad9 to your computer and use it in GitHub Desktop.
Add git\bin folder to PATH (git for windows)
@echo off
cls
echo Set objShell = CreateObject("WScript.Shell") > c:\set_path.vbs
echo Set objEnv = objShell.Environment("System") >> c:\set_path.vbs
echo PathToAdd = "C:\Program Files\Git\bin" >> c:\set_path.vbs
echo oldSystemPath = objEnv("PATH") >> c:\set_path.vbs
echo newSystemPath = oldSystemPath ^& ";" ^& PathToAdd >> c:\set_path.vbs
echo objEnv("PATH") = newSystemPath >> c:\set_path.vbs
echo wscript.echo "Complete" >> c:\set_path.vbs
c:\set_path.vbs
del c:\set_path.vbs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment