os.restart: Restarts the operating system (Windows) through a shell command
Description
This restarts Windows after set amount of time.Usage
os.restart(s = 0, m = 0, h = 0)
Arguments
s
time to wait before shutting down (in seconds),
added to m and h; passed to
Sys.sleep
m
time to wait before shutting down (in minutes),
added to s and h; passed to
Sys.sleep
h
time to wait before shutting down (in hours),
added to s and m; passed to
Sys.sleep
Value
- The status code of
shell
.
References
http://superuser.com/questions/42124/how-can-i-put-the-computer-to-sleep-from-command-prompt-run-menu
,
http://www.howtogeek.com/howto/windows-vista/quick-tip-create-shutdown-restart-lock-icons-in-windows-vista/