4
0
This command immediately logs off the user:
shutdown /l /f
/l = This option will immediately log off the current user on the current machine. You can not use the /l option with the /m option to log off a remote computer. The /d, /t, and /c options are also not available with /l.
As I can't use /t /c
switches, I can't time the log off.
Note: It should logoff even after closing the command.
Any alternate ways?
timeout /T 10 && logoff
doesn't work? – gregg – 2018-02-19T14:01:46.2131you could write a batch file using
ping 192.0.2.2 -n 1 -w 10000 > nul
as a delay thenshutdown /l /f
or do you have restriction on they why it needs to be performed? – 50-3 – 2013-08-13T07:44:18.1901On Windows 7, you could also use
timeout 10
, however I need this logoff to occur even after the batch/command finishes. – user243868 – 2013-08-13T07:46:33.120