diff options
author | Jack Humbert <jack.humb@gmail.com> | 2016-04-11 14:50:01 -0400 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2016-04-11 14:50:01 -0400 |
commit | 27e15b5d9f9cd435addd095c99c5a3e4236fcac1 (patch) | |
tree | dbe7366ec58cce3bc229366a226586e7755b6c8c | |
parent | 9837e69a8f854315401d155b8f62f6458c679417 (diff) | |
parent | b437de8874244711280f984c1db463937750072d (diff) | |
download | qmk_firmware-27e15b5d9f9cd435addd095c99c5a3e4236fcac1.tar.gz qmk_firmware-27e15b5d9f9cd435addd095c99c5a3e4236fcac1.zip |
Merge pull request #247 from NoahAndrews/fix-path-script
Fix important bugs in the path script for Windows
-rw-r--r-- | 1-setup-path-win.bat | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/1-setup-path-win.bat b/1-setup-path-win.bat index 2c15857bb7..f612d0f4a7 100644 --- a/1-setup-path-win.bat +++ b/1-setup-path-win.bat @@ -5,8 +5,14 @@ SET CMDLINERUNSTR=%SystemRoot%\system32\cmd.exe SET NEWPATH1="C:\MinGW\msys\1.0\bin" SET NEWPATH2="C:\MinGW\bin" -:: Make sure paths exist -IF NOT EXIST !NEWPATH1! (ECHO Path not found: %NEWPATH1% && GOTO ExitBatch) +:: Make sure we're running with administrator privileges +NET SESSION >nul 2>&1 +IF ERRORLEVEL 1 ( + ECHO FAILED. Run this script with administrator privileges. + GOTO ExitBatch +) + +:: Make sure the second path exists. The first path won't be created until the second script is run IF NOT EXIST !NEWPATH2! (ECHO Path not found: %NEWPATH2% && GOTO ExitBatch) :: Add paths |