How can I open a message box in a Windows batch file?

Send Us a Sign! (Contact Us!)
--> (Word) --> (PDF) --> (Text)

SCENARIO

My question is: how can I make a [gs batch] file open a popup screen?

Like:

[tab:Method 1]

METHOD 1

Something like the following saved in MessageBox.vbs (from simple .txt to .vbs):

Set objArgs = WScript.Arguments 
messageText = objArgs(0) 
MsgBox messageText 

Which you would call like:

cscript MessageBox.vbs "This will be shown in a popup."

[tab:Method 2]

METHOD 2

This way your batch file will create a VBS [gs script] and show a [gs popup]. After it runs, the batch file will delete that intermediate [gs file].

[tweet]

The advantage of using MSGBOX is that it is really customazable (change the title, the icon etc).

echo MSGBOX "YOUR MESSAGE" > %temp%\TEMPmessage.vbs
call %temp%\TEMPmessage.vbs 
del %temp%\TEMPmessage.vbs /f /q

[tab:END]

SOURCE

LINK

LANGUAGE
ENGLISH