China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-11-10 20:46
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Statistical user group information View 4,062 Replies 51
Floor 31 Posted 2007-02-10 06:36 ·  中国 北京 联通
初级用户
★
Credits 52
Posts 25
Joined 2007-02-10 03:18
19-year member
UID 79113
Gender Male
Status Offline
Originally posted by redtek at 2007-2-9 05:26 PM:
Also, I don't have time to debug for you,
Just seeing that you didn't fully state what you need at one time, and you didn't write out the execution effect of stepping through on your own machine, which is worrying,
So, I just wrote...

Brother redtek, it seems that my previous expression wasn't very clear. Now using net user %username% has a problem, prompting that the user is not found. It seems the problem is here.
Floor 32 Posted 2007-02-10 06:43 ·  中国 北京 朝阳区 联通
金牌会员
★★★★
Credits 2,902
Posts 1,147
Joined 2006-09-21 12:00
20-year member
UID 63324
Gender Male
Status Offline
Brother, you're being too polite. Don't thank me. If you want to thank someone, thank brothers zh159, ccwan, and qingfushuan for always helping you enthusiastically solve problems :).

Brother, see if the account you're logged in with doesn't have enough permissions (currently not in the administrator group?).

I don't understand grids and get dizzy looking at English, so I can't help you much, just giving a little suggestion :).

Brother, write the problem completely :).
Brothers zh159, ccwan, and qingfushuan, the experts, will help you solve the problem :).
    Redtek,一个永远在网上流浪的人……

_.,-*~'`^`'~*-,.__.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._
Floor 33 Posted 2007-02-10 06:46 ·  中国 广西 玉林 博白县 电信
金牌会员
★★★★
Credits 3,687
Posts 1,467
Joined 2005-08-08 12:00
21-year member
UID 44210
Status Offline
Originally posted by yuipr at 2007-2-9 17:12:

Thank you very much for your detailed answer.
C:\Documents and Settings\yichuanj>@echo off
net user %username%
The syntax of this command is:


NET Check your spelling of the word first
Floor 34 Posted 2007-02-10 06:49 ·  中国 北京 联通
初级用户
★
Credits 52
Posts 25
Joined 2007-02-10 03:18
19-year member
UID 79113
Gender Male
Status Offline
Originally posted by redtek at 2007-2-9 05:43 PM:
You're too kind. Don't thank me. If you want to thank someone, thank zhi159, ccwan, and qingfushuan who have been helping you enthusiastically to solve the problem : )

Check if the account you're logged in with doesn't have enough permissions (the one you're currently logged in with isn't an administrator...

The account I'm logged in with is in the administrator group. I don't know why this problem exists. I've been hanging out on the forum all afternoon. I'm very grateful for the help from zhi159, ccwan, and qingfushuan. I'm currently executing net user %username% and there are still problems. It's not a permission issue. Does anyone have any other solutions?
Floor 35 Posted 2007-02-10 06:51 ·  中国 北京 联通
初级用户
★
Credits 52
Posts 25
Joined 2007-02-10 03:18
19-year member
UID 79113
Gender Male
Status Offline
Originally posted by zh159 at 2007-2-9 05:46 PM:

Check your word spelling first


Is it not "net user "
Floor 36 Posted 2007-02-10 06:52 ·  中国 广西 玉林 博白县 电信
金牌会员
★★★★
Credits 3,687
Posts 1,467
Joined 2005-08-08 12:00
21-year member
UID 44210
Status Offline
Originally posted by yuipr at 2007-2-9 17:51:

Please not "net user "

Earlier you wrote uesr

echo %username%

See if it can be displayed
Floor 37 Posted 2007-02-10 06:52 ·  中国 四川 绵阳 江油市 电信
高级用户
★★★
Credits 502
Posts 327
Joined 2006-12-30 06:01
19-year member
UID 74981
Gender Male
Status Offline
net user net localgroup
Query user Query user group
Floor 38 Posted 2007-02-10 06:54 ·  中国 四川 绵阳 江油市 电信
高级用户
★★★
Credits 502
Posts 327
Joined 2006-12-30 06:01
19-year member
UID 74981
Gender Male
Status Offline
%username% Current username
Floor 39 Posted 2007-02-10 06:55 ·  中国 北京 联通
初级用户
★
Credits 52
Posts 25
Joined 2007-02-10 03:18
19-year member
UID 79113
Gender Male
Status Offline
Originally posted by zh159 at 2007-2-9 05:52 PM:

You previously wrote uesr

echo %username%

See if it can be displayed

Maybe it was a typo before, please excuse me
C:\Documents and Settings\yichuanj>echo %username%
yichuanj
It shows the current logged-in user
Floor 40 Posted 2007-02-10 06:56 ·  中国 北京 联通
初级用户
★
Credits 52
Posts 25
Joined 2007-02-10 03:18
19-year member
UID 79113
Gender Male
Status Offline
Originally posted by qingfushuan at 2007-2-9 05:52 PM:
net user net localgroup
Query user Query user group

Then does qingfushuan say that in batch processing, just use net user directly?
Floor 41 Posted 2007-02-10 06:57 ·  中国 广西 玉林 博白县 电信
金牌会员
★★★★
Credits 3,687
Posts 1,467
Joined 2005-08-08 12:00
21-year member
UID 44210
Status Offline
Then try again

net user %username%
Floor 42 Posted 2007-02-10 06:59 ·  中国 四川 绵阳 江油市 电信
高级用户
★★★
Credits 502
Posts 327
Joined 2006-12-30 06:01
19-year member
UID 74981
Gender Male
Status Offline
Directly use `net user >>1.txt` in cmd, and the users you queried are in 1.txt. Directly use `net loaclgroup >>2.txt`, and the user groups you queried are in 2.txt
Floor 43 Posted 2007-02-10 07:00 ·  中国 四川 绵阳 江油市 电信
高级用户
★★★
Credits 502
Posts 327
Joined 2006-12-30 06:01
19-year member
UID 74981
Gender Male
Status Offline
Please provide the Chinese text that needs to be translated.
Floor 44 Posted 2007-02-10 07:02 ·  中国 北京 联通
初级用户
★
Credits 52
Posts 25
Joined 2007-02-10 03:18
19-year member
UID 79113
Gender Male
Status Offline
Originally posted by qingfushuan at 2007-2-9 05:59 PM:
Directly use net user >>1.txt in cmd, and the 1.txt will be all the users you queried
Directly use net loaclgroup >>2.txt in cmd, and the 2.txt will be all the user groups you queried

This is indeed a method. The key is that when displayed this way, the information for each user is still not clear. The ideal effect is zhanggj (user): (the following is the group information) ccusers, ccusers, ccmsg
Floor 45 Posted 2007-02-10 07:03 ·  中国 北京 联通
初级用户
★
Credits 52
Posts 25
Joined 2007-02-10 03:18
19-year member
UID 79113
Gender Male
Status Offline
Originally posted by zh159 at 2007-2-9 05:57 PM:
Then try again

net user %username%

Still prompts that the user is not found.
Forum Jump: