如果用户属于管理员组则显示为administrators;
如果用户属于普通用户组则显示为users;
自己写了一行代码,可是不能运行,哪位大哥给挑挑错,
或者给个新思路也行,3Q!
代码如下(此代码有误!):
for /f %%g "tokens=2 delims=*" in ('net user %username%^|find ^"本地组成员^"') do echo %%g
Last edited by muya05 on 2006-12-24 at 07:23 PM ]
If the user belongs to the administrator group is displayed as administrators;
If the user belongs to the normal user group is displayed as users;
I wrote a line of code myself, but it can't run. Which big brother can pick out the mistakes,
Or give a new idea is also okay, 3Q!
The code is as follows (this code is wrong!):
for /f "tokens=2 delims=:" in ('net user %username% ^| find "Local Group Members"') do echo %%g
Last edited by muya05 on 2006-12-24 at 07:23 PM ]