How to check for admin rights from a Windows batch file
Simple check for administrative permissions in a batch file:
REM Check for admin rights - net session must run as admin net session >nul 2>&1 if %ErrorLevel% NEQ 0 ( echo You must right-click and select "RUN AS ADMINISTRATOR" to run this script. echo. pause exit /B )
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.