0

I created task by schtasks. This task starts on system start, runs in system account and forces Windows to reboot when it is finished. The task runs for 1-2 minutes. User knows that task is running, but he can forget about it. If user forget about this task he can login and start to do some work and after that suddenly system is turned off.

I want to warn user about coming reboot. Ideally system should show Welcome screen message (similar to message "Do not turn off your computer" when it is updating) and does not show login screen. But I do not know how to do this.

The other possible solution: show window with warning. I tried to show message box from task but it is not visible. Probably application running in system account cannot interact with user.

Can you help me? How to warn user about reboot? What is the easiest way?

Andrey Epifantsev
  • 976
  • 1
  • 11
  • 27

1 Answers1

1

How do you reboot your server ? Shutdown.exe will naturally display a warning message, or you can add your own :

shutdown /r /t 300 /c "server is going to shutdown"
Loïc MICHEL
  • 24,935
  • 9
  • 74
  • 103
  • Task takes long time, several minutes. This time duration cannot be easily predicted, it depends on many parameters. Task initiates shutdown when it is completed. – Andrey Epifantsev Jun 25 '15 at 02:18
  • @AndreyEpifantsev you could use `msg.exe * /W /v "task in progress, server will reboot"` this worked for me from a scheduled task – Loïc MICHEL Jun 25 '15 at 11:50