Am I running as Administrator in a Windows batch file
Am I running as Administrator in a Windows batch file
This is a great way to test:
whoami /groups | findstr /b BUILTIN\Administrators | findstr /c:"Enabled group" && GOTO RunningAsAdmin
ECHO This must be run as AdministratorGOTO NotRunningAsAdmin
:RunningAsAdmin
No comments:
Post a Comment