How to Make Batch Files That Change a Password

Techwalla may earn compensation through affiliate links in this story. Learn more about our affiliate and product review process here.
Execute password changes on your Windows network computers.

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.

Advertisement

Step 1

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

Video of the Day

Step 2

Enter the following text into Notepad:

Advertisement

net user myuser newpass

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

Step 3

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

Advertisement

Advertisement

Step 4

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 5

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

Video of the Day

Advertisement

Advertisement

references