X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=1-setup-path-win.bat;h=f612d0f4a7998ef60d00c32931a6310ec922a0a7;hb=a226255c0b34656b6bd1e3ff3d899929eb964a70;hp=2c15857bb7a759c9eafd5a494b313c9520ae0f6b;hpb=47dd29513eeec7b7f639bef6df441a905ce8bacb;p=qmk_firmware.git diff --git a/1-setup-path-win.bat b/1-setup-path-win.bat index 2c15857bb..f612d0f4a 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