Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 463 Vote(s) - 3.64 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Show a popup/message box from a Windows batch file

#1
Is there a way to display a message box from a batch file (similar to how `xmessage` can be used from bash-scripts in Linux)?
Reply

#2
This will pop-up another Command Prompt window:

START CMD /C "ECHO My Popup Message && PAUSE"
Reply

#3
I use a utility named msgbox.exe from here:

[To see links please register here]


Reply

#4
Msg * "insert your message here"

works fine, just save as a .bat file in notepad or make sure the format is set to "all files"
Reply

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

The advantage of using MSGBOX is that it is really customaziable (change the title, the icon etc) while MSG.exe isn't as much.


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

Reply

#6
msg * /server:127.0.0.1 Type your message here
Reply

#7
In order to do this, you need to have a small program that displays a messagebox and run that from your batch file.

You could open a console window that displays a prompt though, but getting a GUI message box using cmd.exe and friends only is not possible, AFAIK.
Reply

#8
Might display a little flash, but no temp files required. Should work all the way back to somewhere in the (IIRC) IE5 era.

mshta javascript:alert("Message\n\nMultiple\nLines\ntoo!");close();

Don't forget to [escape your parentheses][1] if you're using `if`:

if 1 == 1 (
mshta javascript:alert^("1 is equal to 1, amazing."^);close^(^);
)


[1]:

[To see links please register here]

Reply

#9
I would make a very simple VBScript file and call it using CScript to parse the command line parameters.

Something like the following saved in `MessageBox.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."

[`MsgBox` reference][1] if you are interested in going this route.


[1]:

[To see links please register here]

Reply

#10
Try :

Msg * "insert your message here"

If you are using Windows XP's command.com, this will open a message box.

Opening a new cmd window isn't quite what you were asking for, I gather.
You could also use [VBScript][1], and use this with your .bat file. You would open it from the bat file with this command:

cd C:\"location of vbscript"

What this does is change the directory command.com will search for files from, then on the next line:

"insert name of your vbscript here".vbs

Then you create a new [Notepad][2] document, type in

<script type="text/vbscript">
MsgBox "your text here"
</script>

You would then save this as a .vbs file (by putting ".vbs" at the end of the filename), save as "All Files" in the drop down box below the file name (so it doesn't save as .txt), then click Save!

[1]:

[To see links please register here]

[2]:

[To see links please register here]

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through