@echo off
if not defined username set "username=system"
echo %username%
net localgroup "users"|find /i "%username%" 1>nul 2>nul&&echo %username%是标准用户
net localgroup "administrators"|find /i "%username%" 1>nul 2>nul&&echo %username%是管理员用户
pause
标签:username,判断,用户,echo,nul,username%,管理员 From: https://www.cnblogs.com/liuzhaoyzz/p/16706673.html