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 0000000000..1cf4fda917 --- /dev/null +++ b/util/ELEVATE_LICENSE.md @@ -0,0 +1,25 @@ +Elevate was downloaded from [here](https://jpassing.com/2007/12/08/launch-elevated-processes-from-the-command-line/). + +### LICENSE + +The MIT License (MIT) + +Copyright (c) <year> <copyright holders> + +Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + 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 0000000000..ab3d91da17 --- /dev/null +++ b/util/add-paths.bat @@ -0,0 +1,30 @@ +@SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION +@ECHO off + +SET NEWPATH1="C:\MinGW\msys\1.0\bin" +SET NEWPATH2="C:\MinGW\bin" + +CD %~dp0 + +ECHO. > add-paths.log + +CALL :AddPath %NEWPATH1% +CALL :AddPath %NEWPATH2% + +EXIT /b + +:AddPath <pathToAdd> +ECHO %PATH% | FINDSTR /C:"%~1" > nul +IF ERRORLEVEL 1 ( + REG add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /f /v PATH /t REG_SZ /d "%PATH%;%~1" >> add-paths-detail.log + IF ERRORLEVEL 0 ( + ECHO Adding %1 . . . Success! >> add-paths.log + SET "PATH=%PATH%;%~1" + COPY NUL UPDATE + ) ELSE ( + ECHO Adding %1 . . . FAILED. Run this script with administrator privileges. >> add-paths.log + ) +) ELSE ( + ECHO Skipping %1 - Already in PATH >> add-paths.log + ) +EXIT /b
\ No newline at end of file |