Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a nice way to get a message box to pop up at a scheduled time on top of other windows? The default "Display a Message" action uselessly appears below everything else.

share|improve this question
up vote 4 down vote accepted

How about using Window's built-in msg command like so?

msg * "Message you would like to send"

You can add other parameters such as /TIME:x where x is the number of seconds you want the message to display. Of course, msg /? will show you all the options available.

This implies Windows XP and higher as the system where you want to display the message. If you have a Home Edition of the applicable OS, you're out of luck. See for available parameters.

If you have a Home Edition, the following batch script will pop-up a message using VBSCript's PopUp method:

@echo off
::for an explanation of the PopUp method

::Use the directory from whence script was called as working directory
set CWD=%~dp0

::Use a random file name for the temporary VBScript.
set usrmsg=%CWD%%random%.vbs

::First parameter is the timeout in seconds. 0 = wait forever
set _timeout=%~1

::Second parameter is the message, enclosed in quotes.
set _Message=%~2

::Third parameter is the title of the window, enclosed in quotes.
set _Title=%~3

::This last variable is used to display a button/icon on the window.
::Setting this to 4096 sets the window to Modal (on top of everything else)
set _nType=4160

::Create the temp script using the provided information.
ECHO Set wshShell = CreateObject( "WScript.Shell" )>%usrmsg%
ECHO wshShell.Popup "%_Message%" ^& vbCrLf, %_Timeout%, "%_Title%", %_nType%>>%usrmsg%

::Run the script.
WSCRIPT.EXE %usrmsg%

::Delete the script.
DEL %usrmsg%

::Exit the batch file
exit /b

Hope this helps!

share|improve this answer
What are you talking about? What is msg? I get nothing if I try to run it from the Run box or from the command prompt. – Moss Feb 2 '14 at 2:16
You didn't specify in your question which version of Windows you have. If you have a Home edition, you're out of luck. – JSanchez Feb 2 '14 at 6:11

Use msgbox in vbs. like this:

Set filesys = CreateObject("Scripting.FileSystemObject") 
Set shell = CreateObject("Shell.Application")
Set wshShell = WScript.CreateObject( "WScript.Shell" )
PCName = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" )
msgbox "Dear user on " & PCName & vbcrlf & " " & vbcrlf & "This is a message box on top of all other windows.", &h51000, "I am msgbox"
shell.Open "C:\Users"

Code &h51000 will make sure msgbox in central and on top of all other windows all the time.

If you only want to schedule a msgbox, you can simply use task scheduler, there is a built in function to schedule a message. see location of [start a program] in task scheduler.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.