我有以下代码:的Process.Start抛出“系统找不到指定文件”
var process = new Process
{
StartInfo = { FileName = "http://www.myurl.com", UseShellExecute = false }
};
process.Start(); <-- here exception
process.WaitForExit();//waits while process is finished
//continues to execute
出于某种原因,它会抛出“系统找不到指定文件”的错误。 我想要做的是在process.Start()被调用后,IE窗口被打开。程序等待,直到用户点击IE窗口中的“确认”按钮。一旦点击该按钮,程序将继续执行。
你为什么不UseShellExecute''设置为true? –