Automatic logout with pyautogui?
I'm trying to automate logoff on a Windows system using Python. It should only logout like with win+l and not logoff like with shutdown -l.
I tried using pyautogui to press win+l, but for some reason it doesn't work. The shutdown /L and shutdown -l commands don't work either, as they kill the current user's process and close all processes, like a reboot would.
Thanks for any help!
Hello.
Try:
This would unsubscribe to the user, but I cannot say what influence it has on processes.
unfortunately does the same as shutdown -l, so kills everything, but I look at the ctypes. Thanks for the idea!