General discussion

Locked

keyboard input when running batch file

By raviraja ·
How do I accept a keyboard input when running a NT batch file written in command language .

I could not find any command which will allow
me to read a value from keyborad .

Please help .

Thanks

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

keyboard input when running batch file

by Allen Wilkes In reply to keyboard input when runni ...

Have you tried 'choice' from the Resource kit

Allen

Collapse -

keyboard input when running batch file

by raviraja In reply to keyboard input when runni ...

The question was auto-closed by TechRepublic

Collapse -

keyboard input when running batch file

by joncr In reply to keyboard input when runni ...

"Choice" is ok if you only want one character input but for strings I use ask.exe.
If you cant find it on the internet I can mail you a copy. It prompts for a entry and then sets an environment variable to the entered value. e.g.

ask testvar What server do you want to connect to?
would ask "What server do you want to connect to?" and wait for a servername to be entered. The environment variable testvar is then set to the input. This can be used as any other environment variable such as:net use f: \\%testvar%\c$

Collapse -

keyboard input when running batch file

by raviraja In reply to keyboard input when runni ...

The question was auto-closed by TechRepublic

Collapse -

keyboard input when running batch file

by raviraja In reply to keyboard input when runni ...

This question was auto closed due to inactivity

Back to Windows Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums