I've done a fair bit of googling and always seem to come back to the same solution, which just doesn't seem to work !
private void btnRestart_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("Shutdown.exe", "/r /f /t 00");
}
private void btnShutdown_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("Shutdown.exe", "/s /f /t 00");
}
The CMD appears for a brief second and then closes, without doing anything. Am I missing something?