Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 738
Gutsygibbon Avatar asked Sep 20 '12 14:09

Gutsygibbon


People also ask

How do I create a pop up message in Windows?

Open Notepad (Start>Programs>Accessories>Notepad). In between the two adjacent quotation marks, type the error message you wish to appear in the popup (eg. lol=msgbox("Example",16,"Error")).

What is Echo dot in batch script?

When writing Batch files ( . bat ), ECHO. is used to print a blank line to the screen.


2 Answers

msg * "Enter Your Message" 

Does this help ?

like image 167
shredder Avatar answered Sep 16 '22 17:09

shredder


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" 
like image 25
dbenham Avatar answered Sep 19 '22 17:09

dbenham