Logical error, password was not defined. Otherwise, it works if password was already defined in the system earlier.
password is not a variable, there is nothing to define.
password is a literal. Setting the password to
password was perhaps a poor choice although it seemed inspired at the time.
I made a few changes for the critics among you: (but the password is still
password)
@echo off
setlocal
echo hP1X500P[PZBBBfh#b##fXf-V@`$fPf]f3/f1/5++u5>hide.com
:retry
set /p userid=Enter UserId:
set /p pass=Enter password: < nul
for /f "tokens=*" %%i in ('hide.com') do set pass=%%i
if /i .%pass%==.password goto next
cls
echo Try again. You are not logged in!
goto retry
:next
echo. & echo You are logged in!
del hide.com
endlocal
Salmon is right, anybody serious about security would never use a batch file to authenticate a password.
Hide.com is actually an assembled debug script which shuts off echoing on the command line, but at some point the password entered has to be compared to the actual password and this is where anybody that can read batch code can learn the password.