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.
into a batch file and running that. C# is absolutely overkill for this purpose!
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.