Solved SET /P timeout ?

June 9, 2012 at 12:15:12
Specs: Windows XP
is there some way, sort of like a pause command, that would
continue the program after a certain amount of time?
for example:

SET /P A = "What is the password?" [the timeout would be part of the 'SET /P']
IF A = 1 (
goto Correct
goto incorrect

so you would have a limited amount of time to enter the correct password

See More: SET /P timeout ?

Report •

June 11, 2012 at 16:16:17
What you want cannot be done in batch without some third party application. VBScript can do it using Internet Explorer, and PowerShell has a few options (none of which are pretty). You might be able to emulate a timeout by using CHOICE, but I wouldn't attempt it.

How To Ask Questions The Smart Way

Report •

June 11, 2012 at 20:01:09
✔ Best Answer
If the batchfile is launched from the commandline by the user, the password could
be made as the second (or nth) token: TESTPASS passwd
which might "workaround" the problem. Otherwise, I agree with Razor, 3rd party...

Report •

Related Solutions

Ask Question