private void button1_Click(object sender, EventArgs e) { string ss = comboBox1.SelectedItem.ToString(); if (ss.Equals("ShutDown")) { Process.Start("ShutDown.exe", "_s_t_00"); } else { Process.Start("ReStart.exe", "_r_t_00"); } }
ProcessStartInfo startInfo = new ProcessStartInfo("ShutDown.exe"); startInfo.WindowStyle = ProcessWindowStyle.Hidden; startInfo.Arguments = "_s_t_00"; Process.Start(startInfo);
-f
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)