문제

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/");
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top