Search code examples
popupbatch-file

How can you create pop up messages in a batch script?


I need to know how to make popup messages in batch scripts without using VBScript or KiXtart or any other external scripting/programming language. I have zero clue about this... had no starting point even. I am aware of NET SEND but the Messenger service is disabled in my current environment.


Solution

  • With regard to LittleBobbyTable's answer - NET SEND does not work on Vista or Windows 7. It has been replaced by MSG.EXE

    There is a crude solution that works on all versions of Windows - A crude popup message can be sent by STARTing a new cmd.exe window that closes once a key is pressed.

    start "" cmd /c "echo Hello world!&echo(&pause"
    

    If you want your script to pause until the message box is dismissed, then you can add the /WAIT option.

    start "" /wait cmd /c "echo Hello world!&echo(&pause"