summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter2019-07-23 14:00:58 +0100
committerPeter2019-07-23 14:00:58 +0100
commita661308e4592994066d0780527c57dfe94e4d456 (patch)
treed7ab090f28333f5a371c233c776705899c39f172
parentd26abd5aa312eca43b7a99104d6e51dccf18ad69 (diff)
downloadwin10-prep-a661308e4592994066d0780527c57dfe94e4d456.tar.gz
win10-prep-a661308e4592994066d0780527c57dfe94e4d456.tar.bz2
win10-prep-a661308e4592994066d0780527c57dfe94e4d456.zip
Add permission check
-rw-r--r--0-win10prep.bat17
1 files changed, 13 insertions, 4 deletions
diff --git a/0-win10prep.bat b/0-win10prep.bat
index ef9997f..7f50471 100644
--- a/0-win10prep.bat
+++ b/0-win10prep.bat
@@ -9,10 +9,19 @@ echo.
echo Please review and be aware of what this script does before running it.
echo There is no uninstaller, and backups won't be created.
echo.
-echo You won't be prompted any further.
-echo Press [enter] to begin.
-echo.
-set /p=
+rem check permissions
+net session >nul 2>&1
+if %errorLevel% == 0 (
+ echo You won't be prompted any further.
+ echo Press [enter] to begin.
+ echo.
+ set /p=
+) else (
+ echo This script requires administrator rights.
+ echo Press any key to exit
+ pause >nul
+ exit
+)
rem Process
<NUL set /p=:: Activating Windows...