Yeraze
Yeraze

Reputation: 3289

How can I reboot a Windows XP64 Machine in a Python Script?

How can I reboot a Windows XP64 Machine in a Python Script? This machine does not have the "shutdown" or "restart" executables available.

Upvotes: 4

Views: 543

Answers (2)

Yeraze
Yeraze

Reputation: 3289

found it

win32api.InitiateSystemShutdown("localhost", "Maintenance Reboot", 60, 1, 1)

Upvotes: 4

Igorekk
Igorekk

Reputation: 256

You can use win32api module and call WinApi functions. Recipe at code.activestate.com

Upvotes: 2

Related Questions