How to Make Batch Files That Change a Password

Batch files (BAT) are files that execute on a Windows computer and process plain text commands. Batch files are typically used to change configurations of a computer on a network. One type of administration process used in batch files is a password change, which is executed to prompt the user to change a password during login. Batch files run in the Windows command prompt, so these prompt commands are used in the file.

...
Execute password changes on your Windows network computers.

Step

Click the Windows "Start" button and select "All Programs." Click "Accessories" and then click "Notepad" to open the text editor.

Step

Enter the following text into Notepad:

Step

net user myuser newpass

Step

Replace "myuser" with the name of the computer's user account and replace "newpass" with the password you want to use.

Step

Click the "File" menu button at the top of the Notepad window. Select "Save As" to open a dialog box.

Step

Enter "changepassword.bat" into the file name text box. Select "All Files" from the list of file types drop-down box. Click "Save" to create and save the file.

Step

Double-click the new batch file saved on your machine. A Windows command line prompt opens and the user's password will change.