中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-11-11 12:04
47,815 topics / 349,930 posts / today 0 new / 48,291 members
DOS批处理 & 脚本技术(批处理室) » Need a script to delete extra system accounts
Printable Version  2,351 / 18
Floor16 dato Posted 2007-12-17 22:19
高级用户 Posts 377 Credits 916
Whew, that totally went over my head,

to everest79, could you write a piece of code? Thanks.
Floor17 everest79 Posted 2007-12-17 22:38
金牌会员 Posts 1,127 Credits 2,564
Floor18 everest79 Posted 2007-12-17 22:46
金牌会员 Posts 1,127 Credits 2,564
for /f "skip=1" %i in ('wmic useraccount get name^|more') do find "%i" userlist.ini||net user /delete "%i"

I tested this and it can completely delete full-width-character accounts.
Floor19 dato Posted 2007-12-17 22:51
高级用户 Posts 377 Credits 916
Yeah, thanks everyone for the enthusiastic help. There's still a lot of stuff I can't understand , too much stuff to learn. Special thanks to the two moderators, 3Q

Enumerating User Accounts on the Local Computer
http://www.microsoft.com/china/technet/community/scriptcenter/user/scrug148.mspx

How Can I Save Output to a Text File?
http://www.microsoft.com/china/technet/community/scriptcenter/resources/hey0817.mspx
Prev  1 2
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023