Background
You can log off from Windows with shutdown.exe
.
Requirement
- You want to log off from Windows at the specified time. It should not be shut down after the log-off.
- You want to show a fullscreen message 5 minutes before the log-off process starts so that the user can prepare to log off.
Problem
shutdown.exe /l /t 300
fails with the usage.
On the other hand, shutdown.exe /s /t 300
shuts down Windows properly with a fullscreen message and a 5-minute time-out.
Cause
It is by design. shutdown.exe
cannot accept /t
option with /l
.
There is no out-of-the-box feature of Windows to show a fullscreen message and log-off after a time-out *1.
Note
You might use the parental control feature in Windows if you can have two or more Microsoft account. Note that parental control needs a Microsoft account for a parent and one for a child. For example, if the user account links to the employee number, you cannot make an additional account for yourself.