【发布时间】:2012-12-24 10:30:41
【问题描述】:
这行得通:
Process.Start("control", "/name Microsoft.DevicesAndPrinters");
但这不会:(它只是打开一个命令提示符。)
ProcessStartInfo info = new ProcessStartInfo("cmd.exe");
info.Arguments = "control /name Microsoft.DevicesAndPrinters";
Process.Start(info);
为什么?
(是的,我知道它们并不相同。但第二个“应该”工作。)
【问题讨论】:
-
它对我来说很好用。你的错误是什么?
-
@SonerGönül 没有错误。正如我所写 - 它只是打开一个命令提示符。它应该打开 DevicesAndPrinters。 (你的意思是它为你那个?)
标签: c# .net command-line