diff options
| author | Noah Andrews <NoahAndrews@users.noreply.github.com> | 2016-06-02 13:00:44 -0400 |
|---|---|---|
| committer | Jack Humbert <jack.humb@gmail.com> | 2016-06-02 13:00:44 -0400 |
| commit | c7005cdfcf4e4a3fc4abd536afd9fb9a378994fb (patch) | |
| tree | ae1846953613304d918c0010aefdfc9c9b6bc1a3 /util | |
| parent | 4635b4453335b61df11008fa907eef221db5912b (diff) | |
| download | qmk_firmware-c7005cdfcf4e4a3fc4abd536afd9fb9a378994fb.tar.gz qmk_firmware-c7005cdfcf4e4a3fc4abd536afd9fb9a378994fb.zip | |
Stops explorer.exe from being started with admin privilieges (#373)
Diffstat (limited to 'util')
| -rw-r--r-- | util/ELEVATE_LICENSE.md | 25 | ||||
| -rw-r--r-- | util/add-paths.bat | 30 |
2 files changed, 55 insertions, 0 deletions
diff --git a/util/ELEVATE_LICENSE.md b/util/ELEVATE_LICENSE.md new file mode 100644 index 000000000..1cf4fda91 --- /dev/null +++ b/util/ELEVATE_LICENSE.md | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | Elevate was downloaded from [here](https://jpassing.com/2007/12/08/launch-elevated-processes-from-the-command-line/). | ||
| 2 | |||
| 3 | ### LICENSE | ||
| 4 | |||
| 5 | The MIT License (MIT) | ||
| 6 | |||
| 7 | Copyright (c) <year> <copyright holders> | ||
| 8 | |||
| 9 | Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| 10 | of this software and associated documentation files (the "Software"), to deal | ||
| 11 | in the Software without restriction, including without limitation the rights | ||
| 12 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| 13 | copies of the Software, and to permit persons to whom the Software is | ||
| 14 | furnished to do so, subject to the following conditions: | ||
| 15 | |||
| 16 | The above copyright notice and this permission notice shall be included in | ||
| 17 | all copies or substantial portions of the Software. | ||
| 18 | |||
| 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 21 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| 22 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| 23 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| 24 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| 25 | THE SOFTWARE. \ No newline at end of file | ||
diff --git a/util/add-paths.bat b/util/add-paths.bat new file mode 100644 index 000000000..ab3d91da1 --- /dev/null +++ b/util/add-paths.bat | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | @SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION | ||
| 2 | @ECHO off | ||
| 3 | |||
| 4 | SET NEWPATH1="C:\MinGW\msys\1.0\bin" | ||
| 5 | SET NEWPATH2="C:\MinGW\bin" | ||
| 6 | |||
| 7 | CD %~dp0 | ||
| 8 | |||
| 9 | ECHO. > add-paths.log | ||
| 10 | |||
| 11 | CALL :AddPath %NEWPATH1% | ||
| 12 | CALL :AddPath %NEWPATH2% | ||
| 13 | |||
| 14 | EXIT /b | ||
| 15 | |||
| 16 | :AddPath <pathToAdd> | ||
| 17 | ECHO %PATH% | FINDSTR /C:"%~1" > nul | ||
| 18 | IF ERRORLEVEL 1 ( | ||
| 19 | REG add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /f /v PATH /t REG_SZ /d "%PATH%;%~1" >> add-paths-detail.log | ||
| 20 | IF ERRORLEVEL 0 ( | ||
| 21 | ECHO Adding %1 . . . Success! >> add-paths.log | ||
| 22 | SET "PATH=%PATH%;%~1" | ||
| 23 | COPY NUL UPDATE | ||
| 24 | ) ELSE ( | ||
| 25 | ECHO Adding %1 . . . FAILED. Run this script with administrator privileges. >> add-paths.log | ||
| 26 | ) | ||
| 27 | ) ELSE ( | ||
| 28 | ECHO Skipping %1 - Already in PATH >> add-paths.log | ||
| 29 | ) | ||
| 30 | EXIT /b \ No newline at end of file | ||
