win10-prep

Batch script to tweak Windows 10 to a more usable form
Log | Files | Refs

commit a661308e4592994066d0780527c57dfe94e4d456
parent d26abd5aa312eca43b7a99104d6e51dccf18ad69
Author: Peter <peter@minskio.co.uk>
Date:   Tue, 23 Jul 2019 14:00:58 +0100

Add permission check

Diffstat:
M0-win10prep.bat | 17+++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)

diff --git 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...