prompt for a parameter when running a .bat file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In windows95/98 it was possible to create a shortcut to
a .bat file and edit th properties to include a question
mark ? after the filename. This would cause the user to be
presented with a dialog box prompting for a parameter
which was interpreted by %1 in the batch file. Any easy
way to do the same in Win200?
 
In windows95/98 it was possible to create a shortcut to
a .bat file and edit th properties to include a question
mark ? after the filename. This would cause the user to be
presented with a dialog box prompting for a parameter
which was interpreted by %1 in the batch file. Any easy
way to do the same in Win200?

Insert the following line near the beginning of your batch file:

set /p parameter="Please enter the parameter: "
 
Back
Top