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-08-10 09:02
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Solved] How do I change a password in a batch file? View 886 Replies 2
Original Poster Posted 2004-01-05 00:00 ·  中国 广东 河源 电信
高级用户
★★
Credits 916
Posts 201
Joined 2003-05-04 00:00
23-year member
UID 1849
Gender Male
Status Offline
Can a batch file be used to do this: when the machine boots, two dialog boxes appear on the screen, one where entering the password lets you get in; the other provides password changing. After entering password change, it asks you to enter the old password; if it is correct, then enter the new password. That way the password is changed successfully. (The hard part is how to change the old password here?)

How exactly can this be done in a batch file?

[ Last edited by HAT on 2008-11-6 at 17:51 ]
Floor 2 Posted 2008-11-06 14:36 ·  中国 上海 电信
初级用户
★★
Credits 35
Posts 62
Joined 2008-10-12 21:46
17-year member
UID 128197
Gender Male
Status Offline
@echo off
net user 用户名 *
pause

I don't really know either, I only know how to change the password, hehe. If you figure it out, tell me too!
Floor 3 Posted 2008-11-06 16:55 ·  中国 江西 赣州 电信
初级用户
Credits 80
Posts 45
Joined 2006-09-22 22:28
19-year member
UID 63398
Gender Male
From jiangxi
Status Offline
Using a batch file to make dialog boxes is very hard
Change the password:

net user 用户名 新密码/add
Forum Jump: