中国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-08-26 18:29
47,812 topics / 349,912 posts / today 2 new / 48,264 members
其它操作系统综合讨论区 » What parameter in a batch file represents the currently logged-in user
Printable Version  727 / 1
Floor1 vagrancyliu Posted 2006-04-25 15:37
初级用户 Posts 8 Credits 39 From 广东东莞
In Win2k, I want to write a batch file like this: use one parameter to represent the currently logged-in user, and add the current user to the administrators group. Experts, please help, I'm waiting online!
Floor2 vagrancyliu Posted 2006-04-25 16:30
初级用户 Posts 8 Credits 39 From 广东东莞
I already know this now, just use net localgroup administrators %username% /add
But this command can only be used under administrators privileges.
Also, does the batch file itself also have to be run under administrators privileges for it to work?
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023