117Views5Replies

Author Options:

How Can I Add Options To My Batch File? Answered

How can I add options to my batch file?Like, for example, a box comes up with text, and has options such as abort\retry\cancel, or yes\no, etc. Please help!

Discussions

0
None
orksecurity

Best Answer 8 years ago

The batch language has no provision for interaction. Generally what's done is to have it invoke a program which interacts with the user and leaves the answer in a testable place -- the program's return code, or creating/destroying a scratchfile which can be tested with "if exists".

0
None
Prof. Pickle

6 years ago

You can't do anything like this using batch files (as far as I know) but I do know that you can do this with VBS.

0
None
orksecurity

8 years ago

(I should say: You can, of course, read parameters from the rest of the command line. Or you can do a "press any key" using the pause keyword. But that's about it without helper programs. At least, unless Microsoft snuck another weirdity past us when I wasn't paying attention.)

0
None
Filesorksecurity

Answer 8 years ago

Hmm.. I think I'm going to try that. That sounds like it will work.

0
None
Files

8 years ago

Okay, thank you.I could of sworn I've seen it before, but that might have been a VBS file..Thanks for the tip, I'll try something along those lines in due time.