相关疑难解决方法(0)

为什么要Process.Start("cmd.exe",进程); 不行?

这有效:

Process.Start("control", "/name Microsoft.DevicesAndPrinters");
Run Code Online (Sandbox Code Playgroud)

但这不会:(它只是打开一个命令提示符.)

ProcessStartInfo info = new ProcessStartInfo("cmd.exe");
info.Arguments = "control /name Microsoft.DevicesAndPrinters";
Process.Start(info);
Run Code Online (Sandbox Code Playgroud)

为什么?

(是的,我知道他们不一样.但第二个"应该"有效.)

.net c# command-line

15
推荐指数
2
解决办法
4万
查看次数

标签 统计

.net ×1

c# ×1

command-line ×1