批处理 管理员权限检查命令

nkc3g4 发表于 2012-8-27 21:27:49
echo "flag">>%windir%\system32\test1.log
if not exist %windir%\system32\test1.log (
cls
echo 请使用管理员身份运行!!!
pause
exit
)
cls
del %windir%\system32\test1.log

如果没有使用管理员权限运行将会 提示退出

来源: 萝卜头IT论坛 查看完整版本