Permalink
Browse files

Create chkPermissions.bat

  • Loading branch information...
npocmaka committed Jan 26, 2017
1 parent 97d598a commit 70424583aea9c32b0044444fd836a6ffe9597f00
Showing with 15 additions and 0 deletions.
  1. +15 −0 system/chkPermissions.bat
View
@@ -0,0 +1,15 @@
@echo off
setlocal enableDelayedExpansion
:: checks if the current session has admin permissions
:: uses only internal commands (checks existence of =:: variable)
:: exist with 1 if there are
:: and with 0 if there are no
set "dv==::"
if defined !dv! (
echo has NOT admin permissions
endlocal & exit /b 0
) else (
echo has admin permissions
endlocal & exit /b 1
)

0 comments on commit 7042458

Please sign in to comment.