Display message box from Task Scheduler on top of all other windows

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 http://ss64.com/nt/msg.html 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
::See http://msdn.microsoft.com/en-us/library/x83z1d9f(v=vs.84).aspx
::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!

Added: Gregg mentions in the comments that in order for this to work in Windows 10, you must use "/time:0" if you want the message to stay on-screen longer than 60 seconds.


Also see https://www.howtogeek.com/136894/how-to-create-popup-reminders-with-no-additional-software/. In case of link death, I'll summarize here:

  1. Open Windows Task Scheduler (search 'Task Scheduler' in the Start menu)
  2. Under Actions, click 'Create Task'
  3. In the General tab, make sure 'Run only when user is logged on' is checked, and 'Hidden' is NOT checked
  4. In the Triggers tab, click 'New' to set a time for the message to trigger
  5. In the Actions tab, click 'New' and make sure the selected action at the top is 'Start a program'
  6. In 'Program/script', type CMD
  7. In 'Add arguments', copy and paste this:

    /C TITLE [Your title here] &ECHO.&ECHO.&ECHO [Your message here] &ECHO.&ECHO.&TIMEOUT [timeout]

  8. Replace [Your title here] and [Your message here] with your preferred text (do not include the brackets)
  9. Replace [timeout] with the number of seconds you want the message to wait before timing out, or -1 if you don't want it to time out (either way, a key press while the console window is in focus will close it)
  10. Click 'OK'!

This will generate a console window with the given text, which will appear ON TOP of your current window, but won't automatically steal the focus (you can keep interacting with your current window as usual).

This was the best solution I found, hope it helps someone!