[python-win32] shutdown remote locked PC
Kelly Black
kelly at hutman.net
Thu Apr 15 15:06:49 CEST 2010
On Thu, Apr 15, 2010 at 12:11:03PM +0200, pacopyc wrote:
> Hi, I've a problem with locked PCs. I can shutdown them (with WMI), but
> only if they are unlocked.
> How can I resolve it? Can you help me?
I think you can probably take the example here:
http://www.blog.pythonlibrary.org/2010/03/27/restarting-pcs-with-python/
The rebootServer.py example has this line:
win32api.InitiateSystemShutdown(None, message, timeout, bForce,bReboot)
So you want to set bForce=1 and bReboot=1
Kelly
More information about the python-win32
mailing list