I need a batch file where a user enters a password and if it is correct it maps a drive. If it is wrong then it needs to go back to the start
I have this
:start
echo Username=****
SET /P password=Please enter the password
IF %password%==password goto map
IF %password%!==!password goto start
:map
NET USE Z: \\server\folder
It works if the password entered is correct, but doesnt if it is wrong
Any help?