Have you ever needed to ask the user a questionfrom an MSDOS Batch file?
|
Well here is a little proggy that will allow you do just that.
It is a very small, simple program named: GETANS
Here's how it works: So your first .bat program can have as few as two lines:
1- run getans, The \fpchain.bat script just sets the environment variable that you have chosen with the answer that the user has given. Then it continues by executing your second batch file which can use the answer. (filePro can pick up the answer with the "GETENV" command or by passing it as a parameter.) That's it. The syntax for the getans.exe program is:
Here is a sample:
The first .bat file:
Assuming the user answers "Small Computer" then getans would generate an \fpchain.bat file that looks like this:
And finally the second bat file, in this case named "ask2.bat":
Happy questioning,
Howie and the Aljex Software Team. |