Link to home
Start Free TrialLog in
Avatar of Mark O'Brien
Mark O'BrienFlag for United States of America

asked on

Need pop up reminders in windows 10

Looking for a way to create pop up display messages on Windows 10 (Similar to what we used to be able to do with Task Scheduler)
Thank you,
Mark
Avatar of Joe Winograd
Joe Winograd
Flag of United States of America image

Hi Mark,
I'm not aware of tasks that could be done in Task Scheduler with previous versions of Windows that can't be done in W10. Please explain what you did before in Task Scheduler that you can't do now in W10. Thanks, Joe
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

I'm assuming you used task scheduler to run a program that created the popup.  I'm guessing you no longer have access to that program?

Can you use Windows 10 notifications?

Here is a simple Powershell script that creates one as an example:
https://gist.github.com/altrive/72594b8427b2fff16431

You can also use .Net to generate them:
https://msdn.microsoft.com/en-us/library/windows/desktop/hh802768(v=vs.85).aspx

If you MUST have a popup window, you can probably find examples of a .Net console app that does it.
Avatar of Mark O'Brien

ASKER

User generated image
MS has shut it off in 10
Can you walk me thur the PS way and the .net way?
I had to write a program to send me an email using the "Start a program" option.

There are several .Net examples out there that will do simple things like popups, emails, notifications, etc...
>>Can you walk me thur the PS way and the .net way?

To be honest:  I don't know all of what the PS script example I posted does.  I would have to look up the commands individually.

I didn't see anything that looked suspicious so I just tried it.  I got the notification.

As far as .Net, find code examples.  Preferably a Console App so you don't have to port it.  There are command line utilities for compiling .Net code into a .exe.
uff.  those both sound like theyre for dev guys
Ah, didn't know that "Send an e-mail" and "Display a message" were both deprecated in W10...learn something new every day here at EE. :)

Seems to me that you can write a program/script and put it in the Action field of the task. I've been doing all of my Windows automation with the AutoHotkey scripting language in recent years, but, of course, you may use any language that you prefer. In AutoHotkey, the pop-up display message could be done via a simple MsgBox command, as shown in my AutoHotkey - Getting Started article, as well as a few other EE articles (https://www.experts-exchange.com/articles/29416/ https://www.experts-exchange.com/articles/29533/ https://www.experts-exchange.com/articles/31560/).

Just noticed your new comment while I was writing this offline...I can definitely say that AutoHotkey is not just "for dev guys". If you simply want to pop up a reminder (a fixed message), your AHK script will be literally just one line of code. If you want some logic around what pops up, the AutoHotkey If statements are very easy to use. Of course, if all you want is a pop-up with a fixed message, you could put an ECHO statement in a batch file and make that the Action in the Task Scheduler job...once again, just one line of code. Regards, Joe
>>uff.  those both sound like theyre for dev guys

Might be but if you have any programming/scripting experience, it shouldn't be too bad to "borrow" a snippet from the web and get it compiled.

The Powershell example just requires running it.

Not familiar with AutoHotKey but if Joe says it is simple, I would trust him with that.  Just requires installing it.

Powershell and .Net are included with Windows.
> Just requires installing it.

Excellent point, slightwv, although it need be installed on only one computer. That computer can compile it into a stand-alone executable (EXE) that can be deployed on all other computers so that none of them has to install it (the compile feature is also discussed in my AutoHotkey article). Regards, Joe
ok might try ahk.  thank you.  So how do you make a pop up for daily, 4:45 pm M-F?
>>So how do you make a pop up for daily, 4:45 pm M-F?

You still use Task Scheduler.  You just select the "Start a program" option and use the AHK program you create to popup a window.
Watch my five-minute EE video Micro Tutorial on Task Scheduler:
How to use the Windows Task Scheduler - An Introduction

It shows making a Daily task that runs at various times, but that would include Saturday and Sunday. Instead, select Weekly and tick only Monday-Friday:

User generated image
And, of course, set it for 4:45pm.

The Action will be "Start a program" and the Program/script will be something like c:\scripts\Popup.ahk on a system where AutoHotkey is installed and something like c:\scripts\Popup.exe on a system where you deploy the compiled, stand-alone executable. Regards, Joe
Run this PowerShell command from Task Scheduler.

powershell.exe -c "Add-Type -AssemblyName PresentationFramework;[System.Windows.MessageBox]::Show('Hello World.')"

Open in new window


That should do the trick!

If you need to add a new line, try this:
powershell -c "Add-Type -AssemblyName PresentationFramework;[System.Windows.MessageBox]::Show(\"Hello World.`nLine2`nLine3\")"

Open in new window


This should take care of creating the task properly, run from the command prompt:

schtasks /create /tn msgbox /tr "powershell.exe -windowstyle hidden -c \"Add-Type -AssemblyName PresentationFramework;[System.Windows.MessageBox]::Show(\\\"Hello World.\\\")\"" /st 16:45 /sc weekly /d mon,tue,wed,thu,fri

Open in new window

The command is even easier without powershell. Create a scheduled task as you would before and as action, configure the following:
msg * Sometext here

Open in new window

If the executing account is system, it will work and any session sees a popup saying "Some text".
I gave up on the Windows task scheduler.  Im trying 3rd party "DesktopReminder"
Now why would you do that? Task scheduler is reliable, built-in and setting up that tasks is done in seconds...
Ok, if you have no more needs, please close the question now by selecting helpful answers i(if any).
I gave up on the Windows task scheduler.
What problem are you having with it? It works extremely well and is certainly the standard, preferred method for scheduling periodic tasks in Windows. Regards, Joe
Running the following from the command prompt should produce the result you're looking for:

schtasks /create /tn msgbox /tr "msg * Hello World." /st 16:45 /sc weekly /d mon,tue,wed,thu,fri

Open in new window


Once created, to test you'd simply run:

schtasks /run /tn msgbox

Open in new window

MS shut it off in 10
>>MS shut it off in 10

They didn't shut it off.  Only the options to display a message or send an email.  Start a program is still there and the "msg * Hello World" is the command you run.

Open a CMD prompt and type:
msg * Hello World
Hi Mark,
Putting a +1 on the comments about msg from McKnife and slightwv. When you create the Action in Task Scheduler, the "Program/script field" is msg and the "Add arguments (optional)" field is whatever you want the reminder to say (Hello World in the examples above). If you don't want to use msg (and I don't know why you wouldn't, as it creates a nice-looking message box), you could create a batch file (say, reminder.bat) and put this in it:

echo off
echo %1
pause

Open in new window

Then the "Program/script field" is reminder.bat and the "Add arguments (optional)" field is whatever you want the reminder to say, but with quotes around it, such as "this is your reminder - Hello World" (quotes are needed because of the spaces). That will give you an ugly command prompt window instead of a pretty MsgBox, but it works, too. In any case, you would set the reminder times in the Triggers of the Task Scheduler task, as discussed in my video and shown in my my post above. If you want to get fancier with your approach, such as sounding alarms, selecting reminders from a file, snoozing, etc., you could write a more functional program in whatever language you prefer, such as I mentioned above in my post about writing an AutoHotkey script. Regards, Joe
Desktopreminder is working so far but is a little complex too http://www.desktop-reminder.com/en/index.html
I'll keep repeating it and hopefully some day it might stick:
task scheduler and msg.
yup!  and I appreciate your patience!
Whatever you choose, please close the question some day, preferably today ;-)
Ok, but still testing the 3rd party SW
ASKER CERTIFIED SOLUTION
Avatar of Mark O'Brien
Mark O'Brien
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The PowerShell stuff was ruled out a long time ago so there is no need to try it.

The built in "msg" is by far the superior solution.
Win 10 doesnt have a built in function like I need.... see above scrnshts
It has built-in functions, easy to use, fully described above. Why you wouldn't want those? No idea. It's not that experts talk about things that don't work anymore.
>>Win 10 doesnt have a built in function like I need.... see above scrnshts

MSG is built in.  It will display the popup that we believe you requested:
https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/msg
Sends a message to a user on a Remote Desktop Session Host (rd Session Host) server. for examples of how to use this command,

Task scheduler will let you "Start a program".... see above scrnshts

The program task scheduler will start is the msg command.

easy peasy lemon squeezy.

But, if you want to rely on a 3rd party program, it is your system.
We can use two type of notification to the User, that is balloon tool tip notification and pop window. This type of notification can be used to notify the user when completion of execution/while error occurs...

We can achieve the balloon tool tip notification by using  .NET COM objects.

https://dotnet-helpers.com/powershell/creating-a-balloon-tip-notification-using-powershell

Using System.Windows.Forms.NotifyIcon type we can implement the pop up message box.

https://dotnet-helpers.com/powershell/how-to-display-gui-pop-up-message-box-in-powershell/