标签:windows
@echo off
at > nul
if %errorlevel% equ 0 (echo ok) else echo Please switch to an administrator account to run this batch!!!
@echo off
whoami /groups | find "S-1-16-12288" >nul
if ERRORLEVEL 1 (echo [ERROR] This script has to be executed with administrator privilegs) else echo [OK]
本文出自 “鄉间燈火” 博客,请务必保留此出处http://ispart.blog.51cto.com/5816769/1952906
如何通过windows命令来判断批处理是否为最高级别的管理员权限运行
标签:windows
原文地址:http://ispart.blog.51cto.com/5816769/1952906