REM Here, you have to enter username and password
set /p usr="Enter username: "
set /p pass="Enter password: "
REM Set new password for the given username
net user %usr% %pass%
if errorlevel==2 goto error
REM On any error, print error message and return to loop1
echo Could not change password for user %usr% !!!
if errorlevel==2 goto quit
if errorlevel==1 goto loop1
REM Print error message on screen and stop program
echo Program stopped. No password has been changed.
echo Restart passwd, to try again.
REM End program on success
echo Password for user %usr% has been changed successfully.
Copy and past text between BEGIN --- and END --- and save it as e.g. passwd.bat
Hope that helps.
Click Here on HowTo ask good Question to get best Help
Let us know, if the problem is solved !!!