Why does Process.Start(“cmd.exe”, process); not work?

This is because cmd.exe expects a /K switch to execute a process passed as an argument. Try the code below

ProcessStartInfo info = new ProcessStartInfo("cmd.exe");
info.Arguments = "/K control /name Microsoft.DevicesAndPrinters";
Process.Start(info);

EDIT: Changed to /K above. You can use /C switch if you want cmd.exe to close after it has run the command.

Leave a Comment