|
|
#1 |
|
Beta Member
Join Date: Mar 2010
Posts: 1
|
Hi, i want to make a program using C# which will force the shut down in windows. How can i do it? I have no idea about how the shut down works in windows.
|
|
|
|
|
|
#2 |
|
Cheesoid
|
You can run:
shutdown -f -t 10 -s to shutdown a computer running windows, so you could probably just run that as a system command. |
|
|
|
|
|
#3 |
|
Daemon Poster
Join Date: Jul 2009
Posts: 866
|
better yet, just make a quick batch file and drop it on the desktop...
|
|
|
|
|
|
#4 |
|
Site Team
Join Date: Jul 2009
Posts: 2,627
|
As above, I'd recommend just putting
Code:
shutdown -f -t 10 -s The -f in the command is used to force shutdown (even if other programs aren't responding or try to hang.) The -s bit is the bit that's telling it to shut down and the -t 10 means do it in 10 seconds.
__________________
Save the whales, feed the hungry, free the mallocs. |
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|