mirror of
https://github.com/openstenoproject/qmk
synced 2024-11-22 16:34:38 +00:00
Added admin privilege check
Running this as a non-administrator appears to work at first, but the changes wouldn't stick on my Win 8.1 system. It's weird, but this script needs to run as admin.
This commit is contained in:
parent
5b86028d14
commit
b437de8874
1 changed files with 7 additions and 0 deletions
|
@ -5,6 +5,13 @@ SET CMDLINERUNSTR=%SystemRoot%\system32\cmd.exe
|
|||
SET NEWPATH1="C:\MinGW\msys\1.0\bin"
|
||||
SET NEWPATH2="C:\MinGW\bin"
|
||||
|
||||
:: 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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue