Reputation: 2517
Well suddenly my set /p command doesn't seem to be responding. I have written
@echo off
set /p pass=
echo %pass%
pause
When I execute the above code the console displays, ECHO is OFF
without taking any input from the user.
I have recently used SETLOCAL ENABLEDELAYEDEXPANSION
in some other program so has it anything to do with it
Upvotes: 2
Views: 3175
Reputation: 10908
I've copy pasted your code and it is working for me (with and without set ENABLEDELAYEDEXPANSION
).
You did not indicate which version of windows you use.
try to change the set line to:
set /p pass=""
or to:
set /p pass="Enter your password:"
If it still not working for you, check if you can set the variable from a text file:
set /p pass=<filename.txt
Upvotes: 2