1,261 questions
6
votes
2
answers
6k
views
How to programmatically bring a laptop into Sleep mode
What API or tools can I use to query the capabilities of the system and choose the most appropriate on for putting the PC to Sleep, Hibernate or shutdown mode?
14
votes
6
answers
9k
views
Temporarily prevent linux from shutting down
I have a backup script that runs in the background daily on my linux (Fedora 9) computer. If the computer is shut down while the backup is in progress the backup may be damaged so I would like to ...
5
votes
3
answers
743
views
Ascertaining a shutdown is closing my application
Is it possible in .NET to ascertain whether my application is closing due to Windows being given a shutdown command (as opposed to any old application closing) in order to either write out some ...
685
votes
11
answers
2.6m
views
How do I shutdown, restart, or log off Windows via a bat file?
I've been using Remote Desktop Connection to get into a workstation. But in this environment, I cannot use the power options in Start Menu. I need an alternative way to shutdown or restart.
How do I ...
4
votes
4
answers
30k
views
How to force a reboot instead of shutdown (XP)
I have a Windows XP SP2 virtual machine which can be accessed via VNC. It's also running Deep Freeze so there should be no problem in forcing it to reboot. I am looking for a way to force the ...
73
votes
9
answers
112k
views
Shutting down a computer
Is there a way to shutdown a computer using a built-in Java method?