Show a popup/message box from a Windows batch file

First of all, DOS has nothing to do with it, you probably want a Windows command line solution (again: no DOS, pure Windows, just not a Window, but a Console).

You can either use the VBScript method provided by boflynn or you can mis-use net send or msg. net send works only on older versions of windows:

net send localhost Some message to display

This also depends on the Messenger service to run, though.

For newer versions (XP and onward, apparently):

msg "%username%" Some message to display

It should be noted that a message box sent using msg.exe will only last for 60 seconds. This can however be overridden with the /time:xx switch.

Leave a Comment