I am very new at writing batch files, so please excuse my ignorance. I have written a simple batch file that allows me to go into my active directory domain and unlock an account and change their password. The problem is when you unlock their account it closes the program and you have to reopen it back up if you want to change their password. How can I change the batch file to allow it to stay open so I can perform an unlock and a password change without the program closing in between. Here is a copy of my batch file.
Thanks for the help.
set /p loginid="Please enter the user ID:"
set /p reset="To unlock the account press "N" To reset the password press "Y"
if (%reset%)==(n) goto noreset
set /p newpassword="Enter a new password:"
NET USER %loginid% %newpassword% /DOMAIN /ACTIVE:YES
echo User ID %loginid% has been unlocked and the password set to %newpassword%.
NET USER %loginid% /DOMAIN /ACTIVE:YES
echo User ID %loginid% has been unlocked.