Hello all,
I've got the code as shown below:
But somehow, it will start up cmd.exe but it won't execute the command shown at the startInfo.Argum ents.
Anyone who can help me out?
Thanks in advance,
Michael
I've got the code as shown below:
Code:
Process process = new Process();
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
startInfo.FileName = "cmd.exe";
startInfo.Arguments = "shutdown /r";
process.StartInfo = startInfo;
Process.Start(startInfo);
Anyone who can help me out?
Thanks in advance,
Michael
Comment