From 501dcc9e405e9a265bde9fed6759992a6779bd75 Mon Sep 17 00:00:00 2001 From: "Michael H.G. Schmidt" Date: Sun, 13 Nov 2022 21:44:10 +0100 Subject: [PATCH] check for admin --- tools/check-for-admin.cmd | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tools/check-for-admin.cmd diff --git a/tools/check-for-admin.cmd b/tools/check-for-admin.cmd new file mode 100644 index 0000000..a87f0e8 --- /dev/null +++ b/tools/check-for-admin.cmd @@ -0,0 +1,11 @@ +@echo off + +net session >nul 2>&1 +if NOT %ERRORLEVEL% == 0 ( + echo ERROR: User has NO ADMINISTRATOR rights! + pause + exit /b +) + +echo OK. User is an ADMINISTRATOR. +echo.