Problem remotely shutting down a windows computer with python

Kartic kartic.krishnamurthy at
Sun Jan 2 23:50:10 EST 2005


According to the online docs for InitiateSystemShutdown() at

bRebootAfterShutdown : int

Specifies whether the computer is to restart immediately after
shutting down. If this parameter is TRUE, the computer is to restart.
If this parameter is FALSE, the system flushes all caches to disk,
clears the screen, and displays a message indicating that it is safe to
power down.

Same at Microsoft for the Win32 API Call -

Looks like this is the documented outcome. You could alternatively try
setting a little XML-RPC app to invoke 'shutdown -s' on the remote PC
from your PC (e.g. using Twisted Python).


More information about the Python-list mailing list