Since I always forget to close my window at work, I'm trying to display a small message box to remind me when I shut down my computer.
The script is easy enough:
Add-Type -AssemblyName System.Windows.Forms
[System.Windows.Forms.MessageBox]::Show('Close your window', 'LogOff Reminder', 0)
The problem is, I can't get my system, windows 10, to run it at shutdown. I tried setting up a policy with gpedit.msc
. I also tried setting up a task with taskschd.msc
.
I have two ideas what the problem might be:
- The point in time when the script is run is already to late for graphical feedback, the system is already shut down to far.
- My system doesn't do a real shut down, but merely hibernates in support of fast boot.
Has anybody ever gotten this to work? Could you point out how?
Thanks in advance!