Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm calling an exe in a .bat file that returns quickly and I'd like to popup a message box with the results of the text so I can read it (after the program has ended). My .bat looks like this:

curl.exe -someparameters

What do I need to do to make that show a message box after the curl call?

EDIT: If there's a better way to do this with PowerShell I'm up for that too.

share|improve this question
up vote 4 down vote accepted
curl.exe -someparameters
share|improve this answer

If notepad would be OK for your popup window, then you could use the following. In this case, you would just click on the red X in the upper right instead of an OK button.

@echo off
curl.exe -someparameters > %TEMP%\output.txt 2>&1
notepad output.txt
del %TEMP%\output.txt

The 2>&1 will redirect both STDOUT (standard-out) and STDERR (standard-error) to output.txt.

share|improve this answer
This didn't seem to work for me. Is it missing a line to launch notepad? – James Cadd Apr 27 '12 at 21:12
Oops, fixed. Add the notepad line! – jftuga Apr 27 '12 at 23:33

Substituting your results for "foo" below:

@echo MsgBox "foo" > %TEMP%\msgbox.vbs
@cscript //NOLOGO %TEMP%\msgbox.vbs
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .