[python-win32] Re: Once Click Shutdown, restart or Switch User

Roger Upole rwupole at msn.com
Tue Aug 1 08:45:14 CEST 2006


Tony Cappellini wrote:
>I would like to write a simple program so I can initiate a Shutdown (power
> off), Restart, or Switch User.
> 
> Would someone point to  the API's that  I need to do this?

You can do a shutdown or reboot with win32api.ExitWindowsEx.
To switch users, use win32ts.WTSDisconnectSession.

    Roger



More information about the Python-win32 mailing list