PDA

View Full Version : Wait for user to press a key


Rogier
06-05-2008, 02:12 PM
When running scripts from the command line (with VisBuildCmd.exe) I would like to wait for a keypress or something in case of failure, so I can see the error before the window closes.

I tried doing this with running %DOSCMD% pause, but that doesn't work. I see "press any key to continue" but it closes immediately.

Is there a way to do this properly?

kinook
06-05-2008, 02:28 PM
Configure the Run Program step to Read program output from 'None' and uncheck the Hide application window option.

Also, if VisBuildCmd.exe is run from a Command Prompt, the last build output will be shown in the Command Prompt window.

Or, you could add a Wait step to wait (and use Ctrl+C or Ctrl+Break to abort the wait).

Or use a Run Script step that calls MsgBox or InputBox (see the Prompt.bld sample).

Another option would be to open the log file on build failure (for instance, using a Run Program with command like %DOSCMD% start "%LOGFILE%" or Notepad "%LOGFILE%").