I use the following code for shutdown the own System.It was working Fine.And I need to shut down another System, which is connected in LAN Connection. I'm unable to do it with this code. How to Shutdown another System using shutdown.exe? My OS is windows7.
using System.Diagnostics;
protected void Button1_Click(object sender, EventArgs e)
{
Process.Start("shutdown.exe", "-s -t 00");
}
Press Windows key + R on the keyboard to open the Run dialog. Type shutdown /i command and click the OK button. Click the Add button. Enter the computer name or IP address of the remote computer.
Shut down machines remotely from any computer on the network by clicking the Start button in the lower-left corner of your screen, selecting "All Programs," "Accessories" and then "Command Prompt." Type "shutdown /i" (without the quotes) and press "Enter" to open the remote shutdown dialog box.
Menu Start->Run->type cmd-> press enter
in cmd type
shutdown /?
You can see help, according to help the key you need is
/m \\computer Specify the target computer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With