Reputation: 60751
when i run a .BAT file, it displays a message but immediately closes the window
how i can i force it to keep the window open so that i can see the message reeturned?
Upvotes: 2
Views: 1054
Reputation: 13551
An alternative is to execute this bat file from an already opened command prompt (shortcut: Windows Key + R, type cmd
, press ENTER)
Upvotes: 1
Reputation: 4166
You can also wrap it another batch file that calls the original and then pauses:
FOO.BAT
PAUSE
This also works for read-only batch files and compiled executables.
Upvotes: 1
Reputation: 40319
One way is to conclude the batch file with the
PAUSE
command.
Upvotes: 4