try
Process objProcess = Process.Start("IEXPLORE.EXE", "-nomerge http://google.com/");
Вопрос
I have following code:
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
For some reason it throws "The system cannot find the file specified" error. What I want to do is after process.Start() is called, IE window is opened. Program waits, till user clicks "Confirm" button in IE window. As soon as this button clicked, program continues to execute.
Решение
try
Process objProcess = Process.Start("IEXPLORE.EXE", "-nomerge http://google.com/");