I save log in/out details of all the users to a text file through a .bat
file, which is executed by Task Scheduler
(on workstation-lock/unlock)/ gpedit.msc
(on user logout/login).
I want to run the same or any .bat
file when Switch User is chosen instead of log out/ workstation lock after CTRL+ALT+DEL
.
The .bat
file looks like
echo Logoff: %date% %time:~0,5% %UserName% >> c:\Logs\History.txt
Is there any way to do so?